From 3dc4b9ac86968c6a921c546a44c1929ad6684473 Mon Sep 17 00:00:00 2001 From: Steffen Imhof Date: Tue, 17 Jun 2014 09:46:17 +0200 Subject: [PATCH 1/8] Move animation-related header out of QT_NO_IM #ifndef. Change-Id: I7f0bfed4ff9a608575cf6795016b2fa134fd273f Reviewed-by: Marc Mutz --- src/widgets/widgets/qlineedit_p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp index a4394ae92b..bafc5352fb 100644 --- a/src/widgets/widgets/qlineedit_p.cpp +++ b/src/widgets/widgets/qlineedit_p.cpp @@ -55,8 +55,8 @@ #ifndef QT_NO_IM #include "qinputmethod.h" #include "qlist.h" -#include #endif +#include QT_BEGIN_NAMESPACE From 7f8f476244e551b224b56c7f2bff128bc4d873b8 Mon Sep 17 00:00:00 2001 From: Steffen Imhof Date: Tue, 17 Jun 2014 09:51:07 +0200 Subject: [PATCH 2/8] Compile fix for QT_NO_IM in QtWidgets Added some #ifdef guards around usages of composeMode(). Change-Id: If2f2d3cae21b270933b38ea67dcc885f5871785f Reviewed-by: Marc Mutz --- src/widgets/widgets/qlineedit.cpp | 7 ++++++- src/widgets/widgets/qwidgetlinecontrol.cpp | 2 ++ src/widgets/widgets/qwidgetlinecontrol_p.h | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index ba4dbcc878..f1c884e77f 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1528,13 +1528,16 @@ void QLineEdit::mouseMoveEvent(QMouseEvent * e) #else const bool select = (d->imHints & Qt::ImhNoPredictiveText); #endif +#ifndef QT_NO_IM if (d->control->composeMode() && select) { int startPos = d->xToPos(d->mousePressPos.x()); int currentPos = d->xToPos(e->pos().x()); if (startPos != currentPos) d->control->setSelection(startPos, currentPos - startPos); - } else { + } else +#endif + { d->control->moveCursor(d->xToPos(e->pos().x()), select); } } @@ -1585,6 +1588,7 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e) int position = d->xToPos(e->pos().x()); // exit composition mode +#ifndef QT_NO_IM if (d->control->composeMode()) { int preeditPos = d->control->cursor(); int posInPreedit = position - d->control->cursor(); @@ -1609,6 +1613,7 @@ void QLineEdit::mouseDoubleClickEvent(QMouseEvent* e) position += (sizeChange - preeditLength); } } +#endif if (position >= 0) d->control->selectWordAtPos(position); diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index 75f30599be..e459171e62 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -187,6 +187,7 @@ void QWidgetLineControl::paste(QClipboard::Mode clipboardMode) */ void QWidgetLineControl::commitPreedit() { +#ifndef QT_NO_IM if (!composeMode()) return; @@ -198,6 +199,7 @@ void QWidgetLineControl::commitPreedit() setPreeditArea(-1, QString()); m_textLayout.clearAdditionalFormats(); updateDisplayText(/*force*/ true); +#endif } diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index 1cee67bfd2..5ce1d0ed56 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -221,8 +221,10 @@ public: } void setText(const QString &txt) { +#ifndef QT_NO_IM if (composeMode()) qApp->inputMethod()->reset(); +#endif internalSetText(txt, -1, false); } void commitPreedit(); From fe7c5feb0dece2bc56f0e32668d0193e0f3268c3 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Sun, 29 Jun 2014 13:25:01 +0200 Subject: [PATCH 3/8] Add missing newline in fallback debug output. This is hit in case of a recursion in the message handler, and message hasn't gone through qMessageFormatString at this point and thus lacks the newline. Change-Id: Ia098b6ccbcc1aff22a4695865f39143ba0152d9c Reviewed-by: Kai Koehne --- src/corelib/global/qlogging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 51169eb963..c47e91e296 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1329,7 +1329,7 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex } ungrabMessageHandler(); } else { - fprintf(stderr, "%s", message.toLocal8Bit().constData()); + fprintf(stderr, "%s\n", message.toLocal8Bit().constData()); } } From 4d5f9df8abe77a8ec1a813b7527c60a422e61946 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 16 Jun 2014 16:50:13 +0200 Subject: [PATCH 4/8] pay attention to the MAKE env variable ... to avoid that inherited MAKEFLAGS turn out to be incompatible with the make we choose. Task-number: QTBUG-39527 Change-Id: I47d4cec58b0643cc5d97868e70b24f7f37e964bb Reviewed-by: Joerg Bornemann --- mkspecs/features/configure.prf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index fe41c541a2..082f983f11 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -1,4 +1,7 @@ -equals(MAKEFILE_GENERATOR, UNIX) { +QMAKE_MAKE = $$(MAKE) +!isEmpty(QMAKE_MAKE) { + # We were called recursively. Use the right make, as MAKEFLAGS may be set as well. +} else:equals(MAKEFILE_GENERATOR, UNIX) { QMAKE_MAKE = make } else:equals(MAKEFILE_GENERATOR, MINGW) { !equals(QMAKE_HOST.os, Windows): \ From b0098056e565d936b0ce1072ea981bc416751701 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 22 Oct 2014 12:12:26 +0200 Subject: [PATCH 5/8] fix namespaced DirectWrite build Change-Id: Iec6d6ca121b2b04fc1eb4a97f1387ee630e6e1f5 Reviewed-by: Friedemann Kleint --- .../platforms/windows/qwindowsfontdatabase.h | 4 ++-- .../windows/qwindowsfontenginedirectwrite.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.h b/src/plugins/platforms/windows/qwindowsfontdatabase.h index a2324544d2..852ab1f8cf 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.h +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.h @@ -46,13 +46,13 @@ #include #include "qtwindows_additional.h" -QT_BEGIN_NAMESPACE - #if !defined(QT_NO_DIRECTWRITE) struct IDWriteFactory; struct IDWriteGdiInterop; #endif +QT_BEGIN_NAMESPACE + class QWindowsFontEngineData { Q_DISABLE_COPY(QWindowsFontEngineData) diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h index 2da014ddc3..f033eb635a 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h @@ -49,16 +49,16 @@ #include #include -class QWindowsFontEngineData; - -struct IDWriteFont ; -struct IDWriteFontFace ; -struct IDWriteFactory ; -struct IDWriteBitmapRenderTarget ; -struct IDWriteGdiInterop ; +struct IDWriteFont; +struct IDWriteFontFace; +struct IDWriteFactory; +struct IDWriteBitmapRenderTarget; +struct IDWriteGdiInterop; QT_BEGIN_NAMESPACE +class QWindowsFontEngineData; + class QWindowsFontEngineDirectWrite : public QFontEngine { public: From 6fa2fec1dd3834515b6a898c304ba81b8b91df2f Mon Sep 17 00:00:00 2001 From: MihailNaydenov Date: Fri, 26 Sep 2014 19:42:39 +0300 Subject: [PATCH 6/8] OS X: Fix broken 2x menu icon when style sheet is applied MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-41623 Change-Id: I4e0640a7739d0ce4f8758dd5d8d17882a6947467 Reviewed-by: Alessandro Portale Reviewed-by: Morten Johan Sørvig --- src/widgets/styles/qstylesheetstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 60bfc8e075..8c52b24869 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -3583,8 +3583,8 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode, QIcon::On); else pixmap = mi.icon.pixmap(pixelMetric(PM_SmallIconSize), mode); - int pixw = pixmap.width(); - int pixh = pixmap.height(); + const int pixw = pixmap.width() / pixmap.devicePixelRatio(); + const int pixh = pixmap.height() / pixmap.devicePixelRatio(); QRenderRule iconRule = renderRule(w, opt, PseudoElement_MenuIcon); if (!iconRule.hasGeometry()) { iconRule.geo = new QStyleSheetGeometryData(pixw, pixh, pixw, pixh, -1, -1); From d8f940930e0dbcea4ee136550b4ca5a38f03b1dc Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 20 Oct 2014 14:40:15 +0200 Subject: [PATCH 7/8] vcxproj: fix writing of librarian settings The settings of the librarian were never written. Creation of static libraries only worked by accident. Adapted the code from the vcproj code path. Task-number: QTBUG-30712 Change-Id: I69917f44305eb458647392d222db477fe5a5b7c8 Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann Reviewed-by: Andy Shaw --- qmake/generators/win32/msbuild_objectmodel.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 5fdfc52dba..1ca2c3ae41 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -54,6 +54,7 @@ QT_BEGIN_NAMESPACE const char _CLCompile[] = "ClCompile"; const char _ItemGroup[] = "ItemGroup"; const char _Link[] = "Link"; +const char _Lib[] = "Lib"; const char _ManifestTool[] = "ManifestTool"; const char _Midl[] = "Midl"; const char _ResourceCompile[] = "ResourceCompile"; @@ -754,8 +755,11 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) // ClCompile write(xml, config.compiler); - // Link - write(xml, config.linker); + // Librarian / Linker + if (config.ConfigurationType == typeStaticLibrary) + write(xml, config.librarian); + else + write(xml, config.linker); // Midl write(xml, config.idl); @@ -1683,7 +1687,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCCustomBuildTool &tool) void VCXProjectWriter::write(XmlOutput &xml, const VCLibrarianTool &tool) { xml - << tag(_Link) + << tag(_Lib) << attrTagX(_AdditionalDependencies, tool.AdditionalDependencies, ";") << attrTagX(_AdditionalLibraryDirectories, tool.AdditionalLibraryDirectories, ";") << attrTagX(_AdditionalOptions, tool.AdditionalOptions, " ") @@ -1703,7 +1707,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCLibrarianTool &tool) //unused << attrTagS(_TargetMachine, tool.TargetMachine) //unused << attrTagT(_TreatLibWarningAsErrors, tool.TreatLibWarningAsErrors) //unused << attrTagT(_Verbose, tool.Verbose) - << closetag(_Link); + << closetag(_Lib); } void VCXProjectWriter::write(XmlOutput &xml, const VCResourceCompilerTool &tool) From a3cb057c3d5c9ed2c12fb7542065c3d667be38b7 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Mon, 22 Sep 2014 12:35:22 +0400 Subject: [PATCH 8/8] Doc: Don't show a description for omitted SH_ComboBox_UseNativePopup enum item \omitvalue does not allow a description of an enum item, so move the description as a comment to the enum declaration. Change-Id: I4192b16e41b704cbad66c0eeafcb141087d2ba65 Reviewed-by: Martin Smith --- src/widgets/styles/qstyle.cpp | 3 +-- src/widgets/styles/qstyle.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index 4c5c7cd17e..c4854f2925 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -1750,8 +1750,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SH_ComboBox_Popup Allows popups as a combobox drop-down menu. - \omitvalue SH_ComboBox_UseNativePopup Whether we should use a native popup. - Only supported for non-editable combo boxes on Mac OS X so far. + \omitvalue SH_ComboBox_UseNativePopup \value SH_Workspace_FillSpaceOnMaximize The workspace should maximize the client area. diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h index 136daa9abd..9c9493041f 100644 --- a/src/widgets/styles/qstyle.h +++ b/src/widgets/styles/qstyle.h @@ -702,6 +702,8 @@ public: SH_ToolTip_FallAsleepDelay, SH_Widget_Animate, SH_Splitter_OpaqueResize, + // Whether we should use a native popup. + // Only supported for non-editable combo boxes on Mac OS X so far. SH_ComboBox_UseNativePopup, // Add new style hint values here