diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/embedded/qkbdlinuxinput_qws.cpp | 4 | ||||
-rw-r--r-- | src/gui/embedded/qmouselinuxinput_qws.cpp | 13 | ||||
-rw-r--r-- | src/gui/image/qimage.h | 13 | ||||
-rw-r--r-- | src/gui/image/qpixmap.h | 10 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qtextengine_mac.cpp | 7 |
6 files changed, 38 insertions, 13 deletions
diff --git a/src/gui/embedded/qkbdlinuxinput_qws.cpp b/src/gui/embedded/qkbdlinuxinput_qws.cpp index 376b0d0..b2e7cb3 100644 --- a/src/gui/embedded/qkbdlinuxinput_qws.cpp +++ b/src/gui/embedded/qkbdlinuxinput_qws.cpp @@ -103,6 +103,7 @@ QWSLinuxInputKbPrivate::QWSLinuxInputKbPrivate(QWSLinuxInputKeyboardHandler *h, QString dev = QLatin1String("/dev/input/event1"); int repeat_delay = -1; int repeat_rate = -1; + int grab = 0; QStringList args = device.split(QLatin1Char(':')); foreach (const QString &arg, args) { @@ -110,12 +111,15 @@ QWSLinuxInputKbPrivate::QWSLinuxInputKbPrivate(QWSLinuxInputKeyboardHandler *h, repeat_delay = arg.mid(13).toInt(); else if (arg.startsWith(QLatin1String("repeat-rate="))) repeat_rate = arg.mid(12).toInt(); + else if (arg.startsWith(QLatin1String("grab="))) + grab = arg.mid(5).toInt(); else if (arg.startsWith(QLatin1String("/dev/"))) dev = arg; } m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDWR, 0); if (m_fd >= 0) { + ::ioctl(m_fd, EVIOCGRAB, grab); if (repeat_delay > 0 && repeat_rate > 0) { int kbdrep[2] = { repeat_delay, repeat_rate }; ::ioctl(m_fd, EVIOCSREP, kbdrep); diff --git a/src/gui/embedded/qmouselinuxinput_qws.cpp b/src/gui/embedded/qmouselinuxinput_qws.cpp index 19a9a99..5b4f664 100644 --- a/src/gui/embedded/qmouselinuxinput_qws.cpp +++ b/src/gui/embedded/qmouselinuxinput_qws.cpp @@ -43,6 +43,7 @@ #include <QScreen> #include <QSocketNotifier> +#include <QStringList> #include <qplatformdefs.h> #include <private/qcore_unix_p.h> // overrides QT_OPEN @@ -101,11 +102,19 @@ QWSLinuxInputMousePrivate::QWSLinuxInputMousePrivate(QWSLinuxInputMouseHandler * setObjectName(QLatin1String("LinuxInputSubsystem Mouse Handler")); QString dev = QLatin1String("/dev/input/event0"); - if (device.startsWith(QLatin1String("/dev/"))) - dev = device; + int grab = 0; + + QStringList args = device.split(QLatin1Char(':')); + foreach (const QString &arg, args) { + if (arg.startsWith(QLatin1String("grab="))) + grab = arg.mid(5).toInt(); + else if (arg.startsWith(QLatin1String("/dev/"))) + dev = arg; + } m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0); if (m_fd >= 0) { + ::ioctl(m_fd, EVIOCGRAB, grab); m_notify = new QSocketNotifier(m_fd, QSocketNotifier::Read, this); connect(m_notify, SIGNAL(activated(int)), this, SLOT(readMouseData())); } else { diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h index c783b76..2aeb3de 100644 --- a/src/gui/image/qimage.h +++ b/src/gui/image/qimage.h @@ -275,12 +275,13 @@ public: QString text(const QString &key = QString()) const; void setText(const QString &key, const QString &value); - // The following functions are obsolete as of 4.1 - QString text(const char* key, const char* lang=0) const; - QList<QImageTextKeyLang> textList() const; - QStringList textLanguages() const; - QString text(const QImageTextKeyLang&) const; - void setText(const char* key, const char* lang, const QString&); +#ifdef QT_DEPRECATED + QT_DEPRECATED QString text(const char* key, const char* lang=0) const; + QT_DEPRECATED QList<QImageTextKeyLang> textList() const; + QT_DEPRECATED QStringList textLanguages() const; + QT_DEPRECATED QString text(const QImageTextKeyLang&) const; + QT_DEPRECATED void setText(const char* key, const char* lang, const QString&); +#endif #endif #ifdef QT3_SUPPORT diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h index 4668913..f5479e7 100644 --- a/src/gui/image/qpixmap.h +++ b/src/gui/image/qpixmap.h @@ -109,8 +109,10 @@ public: QBitmap mask() const; void setMask(const QBitmap &); - QPixmap alphaChannel() const; - void setAlphaChannel(const QPixmap &); +#ifdef QT_DEPRECATED + QT_DEPRECATED QPixmap alphaChannel() const; + QT_DEPRECATED void setAlphaChannel(const QPixmap &); +#endif bool hasAlpha() const; bool hasAlphaChannel() const; @@ -183,7 +185,9 @@ public: inline void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed = 0); void scroll(int dx, int dy, const QRect &rect, QRegion *exposed = 0); - int serialNumber() const; +#ifdef QT_DEPRECATED + QT_DEPRECATED int serialNumber() const; +#endif qint64 cacheKey() const; bool isDetached() const; diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index c900918..d92c418 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -323,7 +323,7 @@ static QChar::Direction skipBoundryNeutrals(QScriptAnalysis *analysis, const ushort *unicode, int length, int &sor, int &eor, QBidiControl &control) { - QChar::Direction dir; + QChar::Direction dir = control.basicDirection(); int level = sor > 0 ? analysis[sor - 1].bidiLevel : control.level; while (sor < length) { dir = QChar::direction(unicode[sor]); @@ -2808,7 +2808,7 @@ QFixed QTextEngine::alignLine(const QScriptLine &line) if (align & Qt::AlignRight) x = line.width - (line.textAdvance + leadingSpaceWidth(line)); else if (align & Qt::AlignHCenter) - x = (line.width - (line.textAdvance + leadingSpaceWidth(line)))/2; + x = (line.width - line.textAdvance)/2 - leadingSpaceWidth(line); } return x; } diff --git a/src/gui/text/qtextengine_mac.cpp b/src/gui/text/qtextengine_mac.cpp index 251d9b5..9da8f03 100644 --- a/src/gui/text/qtextengine_mac.cpp +++ b/src/gui/text/qtextengine_mac.cpp @@ -605,6 +605,12 @@ void QTextEngine::shapeTextMac(int item) const unsigned short *log_clusters = logClusters(&si); bool stringToCMapFailed = false; + // Skip shaping of line or paragraph separators since we are not + // going to draw them anyway + if (si.analysis.flags == QScriptAnalysis::LineOrParagraphSeparator + && !(option.flags() & QTextOption::ShowLineAndParagraphSeparators)) + goto cleanUp; + if (!fe->stringToCMap(str, len, &g, &num_glyphs, flags, log_clusters, attributes(), &si)) { ensureSpace(num_glyphs); g = availableGlyphs(&si); @@ -645,6 +651,7 @@ void QTextEngine::shapeTextMac(int item) const } } +cleanUp: const ushort *uc = reinterpret_cast<const ushort *>(str); if ((si.analysis.flags == QScriptAnalysis::SmallCaps || si.analysis.flags == QScriptAnalysis::Uppercase |