From eab6700ec0f637fd79a5dd1cb541ee6426a699d6 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 12 Jun 2013 12:46:13 +0200 Subject: Fix crash for pressing Ctrl+C in a message box This fixes a regression introduced with e34dccc9e Task-number: QTBUG-31635 Change-Id: I7c991f3b98f5c51e5fb3c12db04d3ace7be87010 Reviewed-by: Friedemann Kleint Reviewed-by: Mitch Curtis --- src/widgets/dialogs/qmessagebox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 4ec828ac83..995d279e13 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1392,7 +1392,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e) #if !defined(QT_NO_TEXTEDIT) if (e == QKeySequence::Copy) { - if (d->detailsText->isVisible() && d->detailsText->copy()) { + if (d->detailsText && d->detailsText->isVisible() && d->detailsText->copy()) { e->setAccepted(true); return; } -- cgit v1.2.3 From 443253cf1191c5157f4a5338a6fc45993ea86061 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 10 Jun 2013 14:41:16 +0200 Subject: Let QTemporaryDir::stressTest() run in temporary directory. Task-number: QTBUG-31618 Change-Id: I60aaa4f57710816cd0e22ea9b097c7e85466fd0c Reviewed-by: David Faure (KDE) --- tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp index 8515f8a698..713d0c5c17 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -279,17 +279,18 @@ void tst_QTemporaryDir::openOnRootDrives() void tst_QTemporaryDir::stressTest() { const int iterations = 1000; + QTemporaryDir rootDir; + QVERIFY(rootDir.isValid()); QSet names; + const QString pattern = rootDir.path() + QStringLiteral("/XXXXXX"); for (int i = 0; i < iterations; ++i) { - QTemporaryDir dir; + QTemporaryDir dir(pattern); dir.setAutoRemove(false); - QVERIFY2(dir.isValid(), qPrintable(QString::number(i))); + QVERIFY2(dir.isValid(), qPrintable(QString::fromLatin1("Failed to create #%1 under %2.").arg(i).arg(QDir::toNativeSeparators(pattern)))); QVERIFY(!names.contains(dir.path())); names.insert(dir.path()); } - for (QSet::const_iterator it = names.constBegin(); it != names.constEnd(); ++it) - QDir(*it).removeRecursively(); } void tst_QTemporaryDir::rename() -- cgit v1.2.3 From b6f24423716b82686c86d33828b7139ac717afdd Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 12 Jun 2013 15:08:28 +0200 Subject: Fix another type of crash when dragging QDockWidget in and out QDockWidgetPrivate::mouseMoveEvent calls q->move() which can result in a call to QDockWidgetPrivate::endDrag(), which will delete the state struct. Therefore mouseMoveEvent needs to check whether it's null or not before accessing it. Task-number: QTBUG-31672 Change-Id: I91a31620f16a80b31b65b2742e7937ae8960f0fd Reviewed-by: Gabriel de Dietrich Reviewed-by: Friedemann Kleint --- src/widgets/widgets/qdockwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index a3c331aa2b..5217e57333 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -873,7 +873,7 @@ bool QDockWidgetPrivate::mouseMoveEvent(QMouseEvent *event) QPoint pos = event->globalPos() - state->pressPos; q->move(pos); - if (!state->ctrlDrag) + if (state && !state->ctrlDrag) mwlayout->hover(state->widgetItem, event->globalPos()); ret = true; -- cgit v1.2.3 From 0bc96d1d6ba29c6e0a4c39cc526d9515036b7453 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 12 Jun 2013 12:52:31 +0200 Subject: Widgets: Do not create QWindow in createTLExtra(). QWidget::setWindowIcon() and similar call createTLExtra() which creates a QWindow without setting the native attributes on the parent, which can cause crashes when setParent_sys() decides to delete the window. Task-number: QTBUG-31672 Change-Id: I4c40ee12741be88b2281df90329ffb698d4009eb Reviewed-by: Shawn Rutledge --- src/widgets/kernel/qwidget.cpp | 5 ++++- src/widgets/kernel/qwidget_qpa.cpp | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index cfccce7c41..f67a93c7b5 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1546,10 +1546,11 @@ void QWidgetPrivate::createTLExtra() x->inTopLevelResize = false; x->inRepaint = false; x->embedded = 0; + x->window = 0; + x->screenIndex = 0; #ifdef Q_WS_MAC x->wasMaximized = false; #endif // Q_WS_MAC - createTLSysExtra(); #ifdef QWIDGET_EXTRA_DEBUG static int count = 0; qDebug() << "tlextra" << ++count; @@ -10109,6 +10110,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) break; } case Qt::WA_NativeWindow: { d->createTLExtra(); + if (on) + d->createTLSysExtra(); #ifndef QT_NO_IM QWidget *focusWidget = d->effectiveFocusWidget(); if (on && !internalWinId() && hasFocus() diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index 3b6c9ca448..dafe7dc42a 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -890,9 +890,7 @@ void QWidgetPrivate::deleteSysExtra() void QWidgetPrivate::createTLSysExtra() { Q_Q(QWidget); - extra->topextra->screenIndex = 0; - extra->topextra->window = 0; - if (q->testAttribute(Qt::WA_NativeWindow) || q->isWindow()) { + if (!extra->topextra->window && (q->testAttribute(Qt::WA_NativeWindow) || q->isWindow())) { extra->topextra->window = new QWidgetWindow(q); if (extra->minw || extra->minh) extra->topextra->window->setMinimumSize(QSize(extra->minw, extra->minh)); -- cgit v1.2.3 From 3e2cd8ef6f1ce4f46719890134c8bba9dbdb19ba Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 11 Jun 2013 16:58:49 +0200 Subject: fix QFileSystemEngine::createDirectory race condition During a call to QDir::mkpath(), the same path could be created by another process, in which case the OS mkdir will fail with EEXIST. But the docs for mkpath() state that it's not an error if it already exists, whereas for mkdir() it is an error. So QFileSystemEngine::createDirectory should accept the EEXIST error silently if it occurs while creating the sequence of parent directories and the final leaf directory, but should fail if EEXIST happens when it was called from QDir::mkdir(), which is when the createParents parameter is false. We assume the operating system mkdir() and CreateDirectory() are atomic, so there should be no race condition in QDir::mkdir(). It's not necessary for mkpath() to call stat() at each level, only to check whether an existing entry is a directory or a file. Also added to the autotest to verify that if the path is an existing file, creating a dir with the same name will fail in either mkdir or mkpath. Task-number: QTBUG-30046 Change-Id: I926352f10654fdf3b322c8685bb85ad8b8844874 Reviewed-by: Oswald Buddenhagen --- src/corelib/io/qfilesystemengine_unix.cpp | 11 ++++++----- src/corelib/io/qfilesystemengine_win.cpp | 13 ++++++------- tests/auto/corelib/io/qdir/tst_qdir.cpp | 18 +++++++++++++++++- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index b18e32b29a..a7517b4c7f 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -510,11 +510,12 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea } if (slash) { const QByteArray chunk = QFile::encodeName(dirName.left(slash)); - QT_STATBUF st; - if (QT_STAT(chunk.constData(), &st) != -1) { - if ((st.st_mode & S_IFMT) != S_IFDIR) - return false; - } else if (QT_MKDIR(chunk.constData(), 0777) != 0) { + if (QT_MKDIR(chunk.constData(), 0777) != 0) { + if (errno == EEXIST) { + QT_STATBUF st; + if (QT_STAT(chunk.constData(), &st) == 0 && (st.st_mode & S_IFMT) == S_IFDIR) + continue; + } return false; } } diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index bee7689535..fdbd6e01e4 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -1044,14 +1044,13 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea } if (slash) { QString chunk = dirName.left(slash); - bool existed = false; - if (!isDirPath(chunk, &existed)) { - if (!existed) { - if (!mkDir(chunk)) - return false; - } else { - return false; + if (!mkDir(chunk)) { + if (GetLastError() == ERROR_ALREADY_EXISTS) { + bool existed = false; + if (isDirPath(chunk, &existed) && existed) + continue; } + return false; } } } diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index d44ef167b5..fbb21e4e9a 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -311,12 +311,28 @@ void tst_QDir::mkdir() void tst_QDir::makedirReturnCode() { QString dirName = QString::fromLatin1("makedirReturnCode"); - QDir::current().rmdir(dirName); // cleanup a previous run. + QFile f(QDir::current().filePath(dirName)); + + // cleanup a previous run. + f.remove(); + QDir::current().rmdir(dirName); + QDir dir(dirName); QVERIFY(!dir.exists()); QVERIFY(QDir::current().mkdir(dirName)); QVERIFY(!QDir::current().mkdir(dirName)); // calling mkdir on an existing dir will fail. QVERIFY(QDir::current().mkpath(dirName)); // calling mkpath on an existing dir will pass + + // Remove the directory and create a file with the same path + QDir::current().rmdir(dirName); + QVERIFY(!f.exists()); + f.open(QIODevice::WriteOnly); + f.write("test"); + f.close(); + QVERIFY(f.exists()); + QVERIFY(!QDir::current().mkdir(dirName)); // calling mkdir on an existing file will fail. + QVERIFY(!QDir::current().mkpath(dirName)); // calling mkpath on an existing file will fail. + f.remove(); } void tst_QDir::rmdir_data() -- cgit v1.2.3 From 703cca8bb7607201aff5a2f833d66dc80a7d0e4d Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 12 Jun 2013 14:57:11 +0200 Subject: Adjust the cmake files to find the dlls in the bin dir. Change-Id: I840f963c3648d123b31f79aa2c8902c0ad74e982 Reviewed-by: Oswald Buddenhagen Reviewed-by: Stephen Kelly --- mkspecs/features/create_cmake.prf | 11 +++++ .../features/data/cmake/Qt5BasicConfig.cmake.in | 54 +++++++++++++--------- src/gui/Qt5GuiConfigExtras.cmake.in | 7 +-- 3 files changed, 46 insertions(+), 26 deletions(-) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 3dae3895de..7a200056ae 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -60,6 +60,17 @@ contains(CMAKE_BIN_DIR, "^\\.\\./.*") { CMAKE_BIN_DIR_IS_ABSOLUTE = True } +!isEmpty(DLLDESTDIR):!static:!staticlib { + CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX]) + contains(CMAKE_DLL_DIR, "^\\.\\./.*") { + CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/ + CMAKE_DLL_DIR_IS_ABSOLUTE = True + } +} else { + CMAKE_DLL_DIR = $$CMAKE_LIB_DIR + CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE +} + CMAKE_HOST_DATA_DIR = $$cmakeRelativePath($$[QT_HOST_DATA], $$[QT_INSTALL_PREFIX]) contains(CMAKE_HOST_DATA_DIR, "^\\.\\./.*") { CMAKE_HOST_DATA_DIR = $$[QT_HOST_DATA]/ diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index c55b728f1b..1a2bd4a94d 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -46,10 +46,10 @@ endmacro() macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${LIB_LOCATION}\") +!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) + set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") !!ELSE - set(imported_location \"IMPORTED_LOCATION_${Configuration}\" \"$${CMAKE_LIB_DIR}${LIB_LOCATION}\") + set(imported_location \"IMPORTED_LOCATION_${Configuration}\" \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") !!ENDIF _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES @@ -187,22 +187,26 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) !!IF isEmpty(CMAKE_DEBUG_TYPE) -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) -!!ELSE - if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" AND EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) -!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD -!!ELSE -!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" ) +!!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS +!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) + \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" !!ELSE - if (EXISTS \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" AND EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) -!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD + \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" !!ENDIF -!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) - _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" ) + AND EXISTS +!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) + \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) !!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +!!ENDIF _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD endif() @@ -220,22 +224,26 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) !!IF isEmpty(CMAKE_RELEASE_TYPE) -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) -!!ELSE - if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" AND EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) -!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD -!!ELSE -!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" ) +!!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS +!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) + \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" !!ELSE - if (EXISTS \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" AND EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) -!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD + \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" !!ENDIF -!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) - _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" ) + AND EXISTS +!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) + \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) !!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +!!ENDIF _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD endif() diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in index 83e77280d5..6ad1d679e1 100644 --- a/src/gui/Qt5GuiConfigExtras.cmake.in +++ b/src/gui/Qt5GuiConfigExtras.cmake.in @@ -16,11 +16,12 @@ set(Qt5Gui_OPENGL_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS}) macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATION IMPLIB_LOCATION) set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) -!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${LIB_LOCATION}\") +!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) + set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") !!ELSE - set(imported_location \"$${CMAKE_LIB_DIR}${LIB_LOCATION}\") + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") !!ENDIF + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") !!ELSE -- cgit v1.2.3 From 19ed991e56dbdec0c530a7626e5e20ebdff3a78e Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 14 Jun 2013 11:51:17 +0200 Subject: Doc: Remove Tweet Search demo from the list of highlighted examples Don't highlight the example until it's updated to use a new version of the Twitter API. Task-number: QTBUG-31745 Change-Id: If7f9ac3391c549f48cfebcdbe6bdcd12eb4a3e13 Reviewed-by: Jerome Pasion --- doc/global/manifest-meta.qdocconf | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf index d4b2f9f066..9dd6cbfb43 100644 --- a/doc/global/manifest-meta.qdocconf +++ b/doc/global/manifest-meta.qdocconf @@ -36,7 +36,6 @@ manifestmeta.filters = highlighted webkit1 webkit2 manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \ "QtQuick/Qt Quick Demo - Photo Surface" \ - "QtQuick/Qt Quick Demo - Tweet Search" \ "QtQuick/Qt Quick Demo - Maroon*" \ "QtQuick/Qt Quick Demo - Calqlatr" \ "QtQuick/Qt Quick Particles Examples - Emitters" \ -- cgit v1.2.3 From dd050d35d77e2f6ac37bd1266a843df55848022f Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 13 Jun 2013 17:43:56 +0200 Subject: network requests: do not access 1st byte of empty byte array ... because otherwise this would crash. Apparently there are cases where the header name is empty. Task-number: QTBUG-31667 Change-Id: I31b3e964502c05b7614c23876bb3752fa75ab22d Reviewed-by: Richard J. Moore Reviewed-by: Shane Kearns --- src/network/access/qnetworkrequest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 3a3e24b80b..00d5b81413 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -752,7 +752,8 @@ static QByteArray headerValue(QNetworkRequest::KnownHeaders header, const QVaria static QNetworkRequest::KnownHeaders parseHeaderName(const QByteArray &headerName) { - // headerName is not empty here + if (headerName.isEmpty()) + return QNetworkRequest::KnownHeaders(-1); switch (tolower(headerName.at(0))) { case 'c': -- cgit v1.2.3 From cf98d1e60764e22e2e3f168708818106af99c498 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 13 Jun 2013 17:50:39 +0200 Subject: OSX color dialog can be accepted repeatedly QNSColorPanelDelegate::finishOffWithCode sets mResultSet = true and it needs to be set false again the next time the dialog is shown. Task-number: QTBUG-31566 Change-Id: If1d4bb9d4e76273c6423f5bf2ae37790e8a9704e Reviewed-by: Liang Qi --- src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm index a0dac445be..514ea0482f 100644 --- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm @@ -274,6 +274,7 @@ static NSButton *macCreateButton(const char *text, NSView *superview) - (void)showModelessPanel { mDialogIsExecuting = false; + mResultSet = false; [mColorPanel makeKeyAndOrderFront:mColorPanel]; } -- cgit v1.2.3 From e083aede62a23af8330bb572366e79e2f42e0cec Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 14 Jun 2013 12:39:02 +0200 Subject: Cocoa color dialog cannot be modal, but should show anyway Silently failing doesn't seem the right way to handle this. Updated docs for DontUseNativeDialog option: it's not just for the Mac anymore. Ensure that the Qt dialog and Mac panel will never be shown at the same time. Change-Id: Ia9e80754df6c7622d9039c8dd050ac4de771a030 Task-number: QTBUG-29161 Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | 10 ++++------ src/widgets/dialogs/qcolordialog.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm index 514ea0482f..901aa667f5 100644 --- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm @@ -368,10 +368,8 @@ void QCocoaColorDialogHelper::exec() bool QCocoaColorDialogHelper::show(Qt::WindowFlags, Qt::WindowModality windowModality, QWindow *parent) { - if (windowModality == Qt::WindowModal) { - // Cocoa's shared color panel cannot be shown as a sheet - return false; - } + if (windowModality == Qt::WindowModal) + windowModality = Qt::ApplicationModal; return showCocoaColorPanel(windowModality, parent); } @@ -434,9 +432,9 @@ bool QCocoaColorDialogHelper::showCocoaColorPanel(Qt::WindowModality windowModal createNSColorPanelDelegate(); QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *delegate = static_cast(mDelegate); [delegate->mColorPanel setShowsAlpha:options()->testOption(QColorDialogOptions::ShowAlphaChannel)]; - if (windowModality == Qt::NonModal) + if (windowModality != Qt::WindowModal) [delegate showModelessPanel]; - // no need to show a Qt::ApplicationModal dialog here, since it will be done in _q_platformRunNativeAppModalPanel() + // no need to show a Qt::WindowModal dialog here, because it's necessary to call exec() in that case return true; } diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index d6254076c5..79a71599c0 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1776,6 +1776,8 @@ void QColorDialog::setOptions(ColorDialogOptions options) d->options->setOptions(QColorDialogOptions::ColorDialogOptions(int(options))); d->buttons->setVisible(!(options & NoButtons)); d->showAlpha(options & ShowAlphaChannel); + if (options & DontUseNativeDialog) + d->nativeDialogInUse = false; } QColorDialog::ColorDialogOptions QColorDialog::options() const @@ -1794,8 +1796,8 @@ QColorDialog::ColorDialogOptions QColorDialog::options() const \value ShowAlphaChannel Allow the user to select the alpha component of a color. \value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons. (Useful for "live dialogs".) - \value DontUseNativeDialog Use Qt's standard color dialog on the Mac instead of Apple's - native color panel. + \value DontUseNativeDialog Use Qt's standard color dialog instead of the operating system + native color dialog. \sa options, setOption(), testOption(), windowModality() */ -- cgit v1.2.3 From 69554e458669c941130c2dc03d42a59ffd00e39e Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 14 Jun 2013 12:39:42 +0200 Subject: OSX: Disable window restoration for the Mac color panel because if it is automatically restored it's out of the application's control, so the user's interaction will be ignored. Change I8ce3cd94f5ae81d7877a346743ca4e0e188baa02 did this for normal windows by default, but the dialog helpers generate windows which aren't affected by that. Task-number: QTBUG-31750 Change-Id: I636bd87b664a489a2dc8693dad5370a715b1cf7b Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm index 901aa667f5..594ad65a18 100644 --- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm @@ -98,6 +98,11 @@ static NSButton *macCreateButton(const char *text, NSView *superview) mDialogIsExecuting = false; mResultSet = false; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) + [mColorPanel setRestorable:NO]; +#endif + if (mHelper->options()->testOption(QColorDialogOptions::NoButtons)) { mStolenContentView = 0; mOkButton = 0; -- cgit v1.2.3 From 13e01fda195bcf55e3fb1862c9467ac9cbbf33c1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 13 Jun 2013 17:28:52 +0200 Subject: assemble the tool commands at use time, after all the precise syntax depends on what exactly the command is used for, so we need to resolve it at the last moment. see followup commits. This logically reverts commits 6f4ff81380862ad0e788151b35d742f548241d5a and 731e6bece5cebe205ca47c1c078c7ac18984ba1c. Change-Id: If285c91d7521069be86d32593b5c2ae2027b3038 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 8 ++++---- mkspecs/features/qt_tool.prf | 11 ++++++----- mkspecs/features/testcase.prf | 2 +- qtbase.pro | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 9ec22d57db..4b96c48aa5 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -191,7 +191,7 @@ defineTest(qtAddRpathLink) { # variable, default defineTest(qtPrepareTool) { - $$1 = $$eval(QT_TOOL.$${2}.command) + $$1 = $$eval(QT_TOOL.$${2}.binary) isEmpty($$1) { $$1 = $$[QT_HOST_BINS]/$$2 exists($$eval($$1).pl) { @@ -204,9 +204,9 @@ defineTest(qtPrepareTool) { $$1 = $$BUNDLENAME } } - $$1 = $$shell_path($$eval($$1)) } - export($$1) + $$1 = $$shell_path($$eval($$1)) + qtAddTargetEnv($$1, QT_TOOL.$${2}.depends) } defineTest(qtAddToolEnv) { @@ -233,7 +233,7 @@ defineTest(qtAddToolEnv) { } defineTest(qtAddTargetEnv) { - deps = $$replace(QT, -private$, ) + deps = $$replace($$2, -private$, ) deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends") !isEmpty(deps) { for(dep, deps): \ diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 0a588807c8..9a6b9634e0 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -19,17 +19,17 @@ CONFIG += console !build_pass:if(!host_build|!force_bootstrap|force_independent) { isEmpty(MODULE):MODULE = $$TARGET - MODULE_DEPENDS = $$replace(QT, -private$, ) + !host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, ) load(qt_build_paths) load(resolve_target) - cmd = $$shell_path($$QMAKE_RESOLVED_TARGET) - !host_build|!force_bootstrap: qtAddTargetEnv(cmd) TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri - TOOL_PRI_CONT = "QT_TOOL.$${MODULE}.command = $$val_escape(cmd)" + TOOL_PRI_CONT = \ + "QT_TOOL.$${MODULE}.binary = $$QMAKE_RESOLVED_TARGET" \ + "QT_TOOL.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.") # Then, inject the new tool into the current cache state @@ -39,6 +39,7 @@ CONFIG += console unset(added) } include($$TOOL_PRI) - cache(QT_TOOL.$${MODULE}.command, transient) + for(var, $$list(binary depends)): \ + cache(QT_TOOL.$${MODULE}.$$var, transient) } diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index 15febe2dd5..e31d1f4539 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -43,7 +43,7 @@ else: check.commands += $(DESTDIR_TARGET) check.commands += $(TESTARGS) # Add environment for non-installed builds -qtAddTargetEnv(check.commands) +qtAddTargetEnv(check.commands, QT) # If the test is marked as insignificant, discard the exit code insignificant_test:check.commands = -$${check.commands} diff --git a/qtbase.pro b/qtbase.pro index 02dc11eac2..6ab032e30f 100644 --- a/qtbase.pro +++ b/qtbase.pro @@ -88,7 +88,7 @@ prefix_build|!equals(PWD, $$OUT_PWD) { TOOL_PRI = $$OUT_PWD/mkspecs/modules/qt_tool_syncqt.pri - TOOL_PRI_CONT = "QT_TOOL.syncqt.command = $$val_escape(cmd)" + TOOL_PRI_CONT = "QT_TOOL.syncqt.binary = $$val_escape(cmd)" write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.") # Then, inject the new tool into the current cache state @@ -97,7 +97,7 @@ prefix_build|!equals(PWD, $$OUT_PWD) { cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added) } include($$TOOL_PRI) - cache(QT_TOOL.syncqt.command, transient) + cache(QT_TOOL.syncqt.binary, transient) } -- cgit v1.2.3 From c932f2cc1352417a760378f59579569673a82b1d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 13 Jun 2013 17:37:53 +0200 Subject: fix command over-escaping in vcproj files the vs ide executes the commands verbatim, so they must not be make-escaped. Task-number: QTBUG-31289 Change-Id: Ie73fd5c4da5527c2d10bc94ccdf60f8a1ca21351 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 4b96c48aa5..abce52c328 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -224,8 +224,10 @@ defineTest(qtAddToolEnv) { else: infix = val = "(set $$name=$$join(value, ;)$$infix) &" } - contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g - else: val ~= s,\\\$,\$\$,g + !contains(TEMPLATE, vc.*) { + contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g + else: val ~= s,\\\$,\$\$,g + } $$1 = "$$val $$eval($$1)" } } -- cgit v1.2.3 From 9d48f14a3cdaee24fb41d192c648b1263edeb70d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 13 Jun 2013 17:41:36 +0200 Subject: always $-escape make commands nmake needs %-escaping in addition to $-escaping, not instead. this has little practical impact, so it went unnoticed. Change-Id: I144b6142eec0151d83a22e0ac5ead7b0415cdafa Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index abce52c328..ca8391b65a 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -226,7 +226,7 @@ defineTest(qtAddToolEnv) { } !contains(TEMPLATE, vc.*) { contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g - else: val ~= s,\\\$,\$\$,g + val ~= s,\\\$,\$\$,g } $$1 = "$$val $$eval($$1)" } -- cgit v1.2.3 From 17c38b25f432767e533d1612df3bcee0d15a4de8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 13 Jun 2013 18:12:07 +0200 Subject: fix rcc & uic .depend_commands unlike the .command, the .depend_command is not executed by make via its chosen shell, but qmake itself via the system's native shell. consequently, it needs different path separators and no make-escaping. Task-number: QTBUG-31289 Change-Id: I480f815753632db6e8d4725f463f8a1fc59680a6 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 33 ++++++++++++++++++++++++++------- mkspecs/features/resources.prf | 4 ++-- mkspecs/features/uic.prf | 4 ++-- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index ca8391b65a..63ae62c42e 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -189,7 +189,7 @@ defineTest(qtAddRpathLink) { export(QMAKE_RPATHLINKDIR) } -# variable, default +# variable, default, [suffix for variable for system() use] defineTest(qtPrepareTool) { $$1 = $$eval(QT_TOOL.$${2}.binary) isEmpty($$1) { @@ -205,16 +205,25 @@ defineTest(qtPrepareTool) { } } } + !isEmpty(3) { + $$1$$3 = $$system_path($$eval($$1)) + qtAddTargetEnv($$1$$3, QT_TOOL.$${2}.depends, system) + } $$1 = $$shell_path($$eval($$1)) qtAddTargetEnv($$1, QT_TOOL.$${2}.depends) } +# target variable, list of env var names, [non-empty: prepare for system(), not make] defineTest(qtAddToolEnv) { + isEmpty(3): \ + ds = $$QMAKE_DIR_SEP + else: \ + ds = $$DIR_SEPARATOR for(env, 2) { value = $$eval($${env}.value) !isEmpty(value) { name = $$eval($${env}.name) - equals(QMAKE_DIR_SEP, /) { + equals(ds, /) { contains($${env}.CONFIG, prepend): infix = \${$$name:+:\$$$name} else: infix = val = "$$name=$$join(value, :)$$infix" @@ -224,7 +233,7 @@ defineTest(qtAddToolEnv) { else: infix = val = "(set $$name=$$join(value, ;)$$infix) &" } - !contains(TEMPLATE, vc.*) { + isEmpty(3): !contains(TEMPLATE, vc.*) { contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g val ~= s,\\\$,\$\$,g } @@ -234,12 +243,17 @@ defineTest(qtAddToolEnv) { export($$1) } +# target variable, dependency var name, [non-empty: prepare for system(), not make] defineTest(qtAddTargetEnv) { deps = $$replace($$2, -private$, ) deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends") !isEmpty(deps) { - for(dep, deps): \ - deppath += $$shell_path($$eval(QT.$${dep}.libs)) + for(dep, deps) { + isEmpty(3): \ + deppath += $$shell_path($$eval(QT.$${dep}.libs)) + else: \ + deppath += $$system_path($$eval(QT.$${dep}.libs)) + } equals(QMAKE_HOST.os, Windows) { deppath.name = PATH } else:contains(QMAKE_HOST.os, Linux|FreeBSD) { @@ -258,13 +272,18 @@ defineTest(qtAddTargetEnv) { pluginpath.value = for(qmod, QMAKEMODULES) { qmod = $$section(qmod, /, 0, -3)/plugins - exists($$qmod): pluginpath.value += $$shell_path($$qmod) + exists($$qmod) { + isEmpty(3): \ + pluginpath.value += $$shell_path($$qmod) + else: \ + pluginpath.value += $$system_path($$qmod) + } } pluginpath.name = QT_PLUGIN_PATH QT_TOOL_ENV += deppath pluginpath } - qtAddToolEnv($$1, $$QT_TOOL_ENV) + qtAddToolEnv($$1, $$QT_TOOL_ENV, $$3) } defineReplace(pkgConfigExecutable) { diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index 34a04b4ee2..68ca4d1442 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -1,4 +1,4 @@ -qtPrepareTool(QMAKE_RCC, rcc) +qtPrepareTool(QMAKE_RCC, rcc, _DEP) isEmpty(RCC_DIR):RCC_DIR = . isEmpty(QMAKE_MOD_RCC):QMAKE_MOD_RCC = qrc @@ -19,7 +19,7 @@ resource_combine { } } rcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} -rcc.depend_command = $$QMAKE_RCC -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} +rcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} rcc.CONFIG += add_inputs_as_makefile_deps rcc.input = RESOURCES rcc.variable_out = SOURCES diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index 83e579cb3a..c6a64050e0 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -1,10 +1,10 @@ -qtPrepareTool(QMAKE_UIC, uic) +qtPrepareTool(QMAKE_UIC, uic, _DEP) isEmpty(UI_DIR):UI_DIR = . isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_ uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} -uic.depend_command = $$QMAKE_UIC -d ${QMAKE_FILE_IN} +uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN} uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} uic.input = FORMS uic.variable_out = GENERATED_FILES -- cgit v1.2.3 From d135a311a34e693d761a3607663b0879be9bbf65 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 14 Jun 2013 09:50:46 +0200 Subject: make Makefiles not depend on .qmake.super this avoids that an empty rebuild after a complete build re-runs qmake everywhere again. according to 1f83f0cf2a this is the behavior i originally intended, but somehow it got lost when switching to the new interpreter. Change-Id: Id5158d7e272fdee4f4a041fb7c828295a0a86684 Reviewed-by: Joerg Bornemann --- qmake/library/qmakeevaluator.cpp | 4 ++-- qmake/library/qmakeevaluator.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index c60119615f..6fb9c05ae5 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1222,7 +1222,7 @@ bool QMakeEvaluator::loadSpec() m_qmakespec = QDir::cleanPath(qmakespec); if (!m_superfile.isEmpty() - && evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) { + && evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) { return false; } if (!loadSpecInternal()) @@ -1813,7 +1813,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFile( m_current = m_locationStack.pop(); pro->deref(); #ifdef PROEVALUATOR_FULL - if (ok == ReturnTrue) { + if (ok == ReturnTrue && !(flags & LoadHidden)) { ProStringList &iif = m_valuemapStack.first()[ProKey("QMAKE_INTERNAL_INCLUDED_FILES")]; ProString ifn(fileName); if (!iif.contains(ifn)) diff --git a/qmake/library/qmakeevaluator.h b/qmake/library/qmakeevaluator.h index 59e3295f69..09617ba019 100644 --- a/qmake/library/qmakeevaluator.h +++ b/qmake/library/qmakeevaluator.h @@ -102,7 +102,8 @@ public: LoadPreFiles = 1, LoadPostFiles = 2, LoadAll = LoadPreFiles|LoadPostFiles, - LoadSilent = 0x10 + LoadSilent = 0x10, + LoadHidden = 0x20 }; Q_DECLARE_FLAGS(LoadFlags, LoadFlag) -- cgit v1.2.3 From a5ecb0bcfd0295723ef6c58136397b9455ec482c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 13 Jun 2013 16:46:50 +0200 Subject: Android Mute and FastForward keys mapped wrong KEYCODE_MEDIA_FAST_FORWARD is mapped to Qt::Key_Forward, which undoes Back. I believe the best match in Qt would be Qt::Key_AudioForward which is also mapped by XCB from XF86XK_AudioForward /* fast-forward audio track */ KEYCODE_MUTE is mapped to Qt::Key_Volume_Mute, but the mute button is for muting the microphone, the volume mute is called KEYCODE_VOLUME_MUTE. Change-Id: Id0b78c9bde78faef1f5d31019693e6c466941d70 Reviewed-by: BogDan Vatra --- src/corelib/global/qnamespace.h | 2 ++ src/corelib/global/qnamespace.qdoc | 1 + src/plugins/platforms/android/src/androidjniinput.cpp | 11 +++++++---- src/plugins/platforms/xcb/qxcbkeyboard.cpp | 2 ++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 74949b86f0..25c47d5d34 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -980,6 +980,8 @@ public: Key_TouchpadOn = 0x01000111, Key_TouchpadOff = 0x01000112, + Key_MicMute = 0x01000113, + Key_MediaLast = 0x0100ffff, // Keypad navigation keys diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 9eb0c6b8f2..f9248eb68d 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1621,6 +1621,7 @@ \value Key_TouchpadToggle \value Key_TouchpadOn \value Key_TouchpadOff + \value Key_MicMute \value Key_MediaLast \value Key_unknown diff --git a/src/plugins/platforms/android/src/androidjniinput.cpp b/src/plugins/platforms/android/src/androidjniinput.cpp index 29ccfe0125..75cb617ca8 100644 --- a/src/plugins/platforms/android/src/androidjniinput.cpp +++ b/src/plugins/platforms/android/src/androidjniinput.cpp @@ -333,7 +333,7 @@ namespace QtAndroidInput return Qt::Key_BracketLeft; case 0x0000005a: // KEYCODE_MEDIA_FAST_FORWARD - return Qt::Key_Forward; + return Qt::Key_AudioForward; case 0x00000057: return Qt::Key_MediaNext; @@ -344,7 +344,7 @@ namespace QtAndroidInput case 0x00000058: return Qt::Key_MediaPrevious; - case 0x00000059: + case 0x00000059: // KEYCODE_MEDIA_REWIND return Qt::Key_AudioRewind; case 0x00000056: @@ -356,8 +356,8 @@ namespace QtAndroidInput case 0x00000045: return Qt::Key_Minus; - case 0x0000005b: - return Qt::Key_VolumeMute; + case 0x0000005b: // KEYCODE_MUTE + return Qt::Key_MicMute; case 0x0000004e: return Qt::Key_NumLock; @@ -405,6 +405,9 @@ namespace QtAndroidInput case 0x00000019: return Qt::Key_VolumeDown; + case 0x000000a4: // KEYCODE_VOLUME_MUTE + return Qt::Key_VolumeMute; + case 0x00000018: return Qt::Key_VolumeUp; diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp index 155b327315..db53e7471e 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -248,6 +248,7 @@ #define XF86XK_TouchpadToggle 0x1008FFA9 #define XF86XK_TouchpadOn 0x1008FFB0 #define XF86XK_TouchpadOff 0x1008FFB1 +#define XF86XK_AudioMicMute 0x1008FFB2 // end of XF86keysyms.h @@ -543,6 +544,7 @@ static const unsigned int KeyTbl[] = { XF86XK_TouchpadToggle, Qt::Key_TouchpadToggle, XF86XK_TouchpadOn, Qt::Key_TouchpadOn, XF86XK_TouchpadOff, Qt::Key_TouchpadOff, + XF86XK_AudioMicMute, Qt::Key_MicMute, XF86XK_Launch0, Qt::Key_Launch2, // ### Qt 6: remap properly XF86XK_Launch1, Qt::Key_Launch3, XF86XK_Launch2, Qt::Key_Launch4, -- cgit v1.2.3 From cf8647d6aa0f65a51dc9366d407b2218f561970d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 18 Jun 2013 14:18:10 +0200 Subject: Remove unused member QFactoryLoaderPrivate::keyList. Task-number: QTBUG-31476 Change-Id: Ife9b25ede67837152d94cd500a1d7c6dc6cd8ab8 Reviewed-by: Lars Knoll --- src/corelib/plugin/qfactoryloader.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index 289fda7afc..943fb35ab6 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -72,7 +72,6 @@ public: QByteArray iid; QList libraryList; QMap keyMap; - QStringList keyList; QString suffix; Qt::CaseSensitivity cs; QStringList loadedPaths; @@ -172,10 +171,8 @@ void QFactoryLoader::update() metaDataOk = true; QJsonArray k = object.value(QLatin1String("Keys")).toArray(); - for (int i = 0; i < k.size(); ++i) { - QString s = k.at(i).toString(); - keys += s; - } + for (int i = 0; i < k.size(); ++i) + keys += d->cs ? k.at(i).toString() : k.at(i).toString().toLower(); } if (qt_debug_component()) qDebug() << "Got keys from plugin meta data" << keys; @@ -192,9 +189,7 @@ void QFactoryLoader::update() // library was built with a future Qt version, // whereas the new one has a Qt version that fits // better - QString key = keys.at(k); - if (!d->cs) - key = key.toLower(); + const QString &key = keys.at(k); QLibraryPrivate *previous = d->keyMap.value(key); int prev_qt_version = 0; if (previous) { @@ -203,7 +198,6 @@ void QFactoryLoader::update() int qt_version = (int)library->metaData.value(QLatin1String("version")).toDouble(); if (!previous || (prev_qt_version > QT_VERSION && qt_version <= QT_VERSION)) { d->keyMap[key] = library; - d->keyList += keys.at(k); } } } -- cgit v1.2.3 From 732dcfe7fdfa7534ab0de4674ae17f191167a57a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 18 Jun 2013 14:48:21 +0200 Subject: QFactoryLoader: Release unused libraries. Task-number: QTBUG-31476 Change-Id: Ib2eb076afaa21ab1fdc12944f80483e3de260d4b Reviewed-by: Lars Knoll --- src/corelib/plugin/qfactoryloader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index 943fb35ab6..1288643e32 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -183,7 +183,7 @@ void QFactoryLoader::update() continue; } - d->libraryList += library; + int keyUsageCount = 0; for (int k = 0; k < keys.count(); ++k) { // first come first serve, unless the first // library was built with a future Qt version, @@ -198,8 +198,13 @@ void QFactoryLoader::update() int qt_version = (int)library->metaData.value(QLatin1String("version")).toDouble(); if (!previous || (prev_qt_version > QT_VERSION && qt_version <= QT_VERSION)) { d->keyMap[key] = library; + ++keyUsageCount; } } + if (keyUsageCount || keys.isEmpty()) + d->libraryList += library; + else + library->release(); } } #else -- cgit v1.2.3 From 021264a239c7c5f30263a59a73f08e482142b291 Mon Sep 17 00:00:00 2001 From: Venu Date: Fri, 14 Jun 2013 17:35:29 +0200 Subject: Tagged all those examples that work on an Android device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change enables the developers to list all the tagged examples on the Qt Creator welcome screen using the "android" tag. Task-number: QTBUG-30173 Change-Id: Ic09183eb441497506b2d35f0d83ecd5d73d724f5 Reviewed-by: Jerome Pasion Reviewed-by: Topi Reiniö Reviewed-by: Christian Stromme --- doc/global/manifest-meta.qdocconf | 101 +++++++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf index 9dd6cbfb43..a86f3a14e4 100644 --- a/doc/global/manifest-meta.qdocconf +++ b/doc/global/manifest-meta.qdocconf @@ -32,7 +32,7 @@ # manifestmeta.global.names = * # manifestmeta.global.tags = qt5 -manifestmeta.filters = highlighted webkit1 webkit2 +manifestmeta.filters = highlighted webkit1 webkit2 android manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \ "QtQuick/Qt Quick Demo - Photo Surface" \ @@ -69,3 +69,102 @@ manifestmeta.webkit2.names = "QtWebKitExamples/Flickr View Example" \ "QtWebKitExamples/YouTube View Example" manifestmeta.webkit2.tags = webkit2 + +manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \ + "QtQuick/Qt Quick Demo - Calqlatr" \ + "QtWidgets/Application Chooser Example" \ + "QtWidgets/Stickman Example" \ + "QtWidgets/Move Blocks Example" \ + "QtWidgets/Border Layout Example" \ + "QtWidgets/Dynamic Layouts Example" \ + "QtWidgets/Flow Layout Example" \ + "QtWidgets/MDI Example" \ + "QtWidgets/Dock Widgets Example" \ + "QtWidgets/Recent Files Example" \ + "QtWidgets/Menus Example" \ + "QtWidgets/Concentric Circles Example" \ + "QtWidgets/Gradients" \ + "QtWidgets/Font Sampler Example" \ + "QtWidgets/Path Stroking" \ + "QtWidgets/Transformations Example" \ + "QtWidgets/Syntax Highlighter Example" \ + "QtWidgets/Calendar Example" \ + "QtWidgets/Movie Example" \ + "QtWidgets/Validators Example" \ + "QtWidgets/Analog Clock Example" \ + "QtWidgets/Calculator Example" \ + "QtWidgets/Mouse Button Tester" \ + "QtWidgets/Character Map Example" \ + "QtWidgets/Wiggly Example" \ + "QtWidgets/Digital Clock Example" \ + "QtWidgets/Elided Label Example" \ + "QtWidgets/Image Viewer Example" \ + "QtWidgets/Sliders Example" \ + "QtWidgets/Tetrix Example" \ + "QtWidgets/Group Box Example" \ + "QtWidgets/Spin Boxes Example" \ + "QtWidgets/Undo Framework" \ + "QtWidgets/Regular Expressions Example" \ + "QtWidgets/Colliding Mice Example" \ + "QtWidgets/Basic Graphics Layouts Example" \ + "QtWidgets/Boxes" \ + "QtWidgets/40000 Chips" \ + "QtWidgets/Diagram Scene Example" \ + "QtWidgets/Drag and Drop Robot Example" \ + "QtWidgets/Elastic Nodes Example" \ + "QtWidgets/Pad Navigator Example" \ + "QtWidgets/Anchor Layout Example" \ + "QtWidgets/Weather Anchor Layout Example" \ + "QtConcurrent/Image Scaling Example" \ + "QtConcurrent/QtConcurrent Progress Dialog Example" \ + "QtNetwork/Torrent Example" \ + "QtNetwork/Network Chat Example" \ + "QtSQL/Master Detail Example" \ + "QtOpenGL/Cube OpenGL ES 2.0 example" \ + "QtOpenGL/Textures Example" \ + "QtLinguist/Arrow Pad Example" \ + "QtGui/Raster Window Example" \ + "QtGui/Analog Clock Window Example" \ + "QtMultimedia/Video Widget Example" \ + "QtMultimedia/Media Player Example" \ + "QtSVG/Text Object Example" \ + "QtQML/Qt Quick Examples - XMLHttpRequest" \ + "QtQuick/Qt Quick Particles Examples - *" \ + "QtQuick/Qt Quick Examples - Touch Interaction" \ + "QtQuick/Scene Graph - *" \ + "QtQuick/Qt Quick Examples - Image Elements" \ + "QtQuick/Qt Quick Examples - Key Interaction" \ + "QtQuick/Qt Quick Examples - Text" \ + "QtQuick/Qt Quick Examples - Animation" \ + "QtQuick/Qt Quick Examples - Shader Effects" \ + "QtQuick/Qt Quick Examples - Canvas" \ + "QtWidgets/Interview" \ + "QtWidgets/Spreadsheet" \ + "QtWidgets/Pixelator Example" \ + "QtWidgets/Class Wizard Example" \ + "QtWidgets/Animated Tiles Example" \ + "QtWidgets/Basic Layouts Example" \ + "QtWidgets/Application Example" \ + "QtWidgets/Affine Transformations" \ + "QtWidgets/Image Composition Example" \ + "QtWidgets/Basic Drawing Example" \ + "QtWidgets/Vector Deformation" \ + "QtWidgets/Painter Paths Example" \ + "QtWidgets/Text Edit" \ + "QtWidgets/Style Sheet Example" \ + "QtWidgets/Code Editor Example" \ + "QtWidgets/Window Flags Example" \ + "QtWidgets/Scribble Example" \ + "QtWidgets/Shaped Clock Example" \ + "QtWidgets/Line Edits Example" \ + "QtWidgets/Calendar Widget Example" \ + "QtWidgets/Completer Example" \ + "QtWidgets/I18N Example" \ + "QtQML/Extending QML - Grouped Properties Example" \ + "QtQML/Extending QML - Methods Example" \ + "QtQML/Extending QML - Signal Support Example" \ + "QtQML/Extending QML - Attached Properties Example" \ + "QtQuick/Qt Quick Examples - Window and Screen" \ + "QtWidgets/Address Book Example" + +manifestmeta.android.tags = android -- cgit v1.2.3 From f5e0ec5e16506166ba6a83d0e024a65a219035b8 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 19 Jun 2013 11:14:51 +0200 Subject: update QtNetwork changelog for 5.1.0 Change-Id: I6392fd125657c4a4a3abb4607fa31bb0d8c0fdd6 Reviewed-by: Richard J. Moore --- dist/changes-5.1.0 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dist/changes-5.1.0 b/dist/changes-5.1.0 index cb96c2debe..bc0db0b9c8 100644 --- a/dist/changes-5.1.0 +++ b/dist/changes-5.1.0 @@ -88,7 +88,16 @@ QtGui QtNetwork --------- - - + - QNetworkAccessManager / QNetworkReply: + * Add a new encrypted() signal so that applications can perform + additional checks on the certificate chain. + - QSslSocket: + * Support for sending intermediate certificates when QSslSocket is used + as a server, and when using client certificates. + - HTTPS internals: + * SSL sessions are re-used by default. + - QHostInfo: + * Allow QHostInfo::lookupHost() with no receiver to warm the DNS cache. QtWidgets --------- -- cgit v1.2.3 From 172fa29dffef0eb55378f62b3ea1c18810639b3f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 19 Jun 2013 18:07:40 +0200 Subject: fix LD_LIBRARY_PATH manipulation in uic calls not being make-escaped the evaluator has the bug that function arguments are inherited. work around that by passing an explicitly empty 3rd parameter to qtAddTargetEnv(). proper fix upcoming in less critical branch. Change-Id: Ic45cc890abaa6271985590d4ebe02c96bff6dec4 Reviewed-by: Kai Koehne Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 63ae62c42e..699c42ee1f 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -210,7 +210,7 @@ defineTest(qtPrepareTool) { qtAddTargetEnv($$1$$3, QT_TOOL.$${2}.depends, system) } $$1 = $$shell_path($$eval($$1)) - qtAddTargetEnv($$1, QT_TOOL.$${2}.depends) + qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, ) } # target variable, list of env var names, [non-empty: prepare for system(), not make] -- cgit v1.2.3 From d806944f067268f13b0892a6158e40225c82a3f5 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 18 Jun 2013 09:24:07 +0200 Subject: Fix code indentation and comment formatting Change-Id: Ic94200988add19d608648c8d3bd56bbfe74bde79 Reviewed-by: Friedemann Kleint --- src/corelib/global/qlogging.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 85ff89ebdd..a37fc15b61 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -917,21 +917,19 @@ static void qt_message_print(QtMsgType msgType, const QMessageLogContext &contex static void qt_message_fatal(QtMsgType, const QMessageLogContext &context, const QString &message) { #if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR) - wchar_t contextFileL[256]; - // we probably should let the compiler do this for us, by - // declaring QMessageLogContext::file to be const wchar_t * in - // the first place, but the #ifdefery above is very complex - // and we wouldn't be able to change it later on... - convert_to_wchar_t_elided(contextFileL, sizeof contextFileL / sizeof *contextFileL, context.file); + wchar_t contextFileL[256]; + // we probably should let the compiler do this for us, by declaring QMessageLogContext::file to + // be const wchar_t * in the first place, but the #ifdefery above is very complex and we + // wouldn't be able to change it later on... + convert_to_wchar_t_elided(contextFileL, sizeof contextFileL / sizeof *contextFileL, + context.file); // get the current report mode int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW); _CrtSetReportMode(_CRT_ERROR, reportMode); - int ret = _CrtDbgReportW(_CRT_ERROR, contextFileL, - context.line, _CRT_WIDE(QT_VERSION_STR), - reinterpret_cast ( - message.utf16())); - if (ret == 0 && reportMode & _CRTDBG_MODE_WNDW) + int ret = _CrtDbgReportW(_CRT_ERROR, contextFileL, context.line, _CRT_WIDE(QT_VERSION_STR), + reinterpret_cast(message.utf16())); + if ((ret == 0) && (reportMode & _CRTDBG_MODE_WNDW)) return; // ignore else if (ret == 1) _CrtDbgBreak(); -- cgit v1.2.3 From 442bce78c1f51a9625eb57b4659becdbb3280591 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 12 Jun 2013 08:31:40 +0200 Subject: Don't depend on the command for extra compilers automatically For vcproj files we should not automatically add a dependency for extra compilers as this should be done via the depends variable for the extra compiler instead. This fixes a problem where something like '@echo command' was used in the command as it would depend on echo and not the actual command anyway. Change-Id: I7c0aa0d62143aa39c518e8bce65f302afdba33c9 Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msvc_objectmodel.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 99f69bfa72..725aba26a2 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2335,7 +2335,6 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) CustomBuildTool.Outputs += out; deps += CustomBuildTool.AdditionalDependencies; - deps += cmd.left(cmd.indexOf(' ')); // Make sure that all deps are only once QHash uniqDeps; for (int c = 0; c < deps.count(); ++c) { -- cgit v1.2.3 From 07a727f8b8ca2ebdb77d2e7edd3b79508683845e Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 20 Jun 2013 12:05:27 +0200 Subject: Android: handle keyboard connect/disconnect Even though the documentation says that "This should never normally happen", we do get a "navigation" change when an external keyboard is connected or disconnected. Thanks to BogDan for finding the solution. Task-number: QTBUG-31806 Change-Id: Id92639800e617821976f842f93e09517529e14ef Reviewed-by: BogDan Vatra --- src/android/java/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/java/AndroidManifest.xml b/src/android/java/AndroidManifest.xml index 48fb23ab28..2a6f52b315 100644 --- a/src/android/java/AndroidManifest.xml +++ b/src/android/java/AndroidManifest.xml @@ -1,7 +1,7 @@ - + -- cgit v1.2.3 From ad43d9a09779cf57410d0ae68513a8dc59187183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Wed, 19 Jun 2013 14:21:40 +0200 Subject: Fix missing focus events for mapped child windows Its a bit brutal Task-number: QTBUG-31776 Change-Id: I2d8b530646d1e2b2ba86f0e82d76f928c9a2bb11 Reviewed-by: Gunnar Sletta --- src/plugins/platforms/xcb/qxcbwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 6291396e6e..e1bc7d36eb 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -1367,10 +1367,10 @@ void QXcbWindow::requestActivateWindow() event.data.data32[4] = 0; Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, m_screen->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event)); - } else { - Q_XCB_CALL(xcb_set_input_focus(xcb_connection(), XCB_INPUT_FOCUS_PARENT, m_window, connection()->time())); } + Q_XCB_CALL(xcb_set_input_focus(xcb_connection(), XCB_INPUT_FOCUS_PARENT, m_window, connection()->time())); + connection()->sync(); } -- cgit v1.2.3 From 531b7d303e96c8fbc54aad0775b99e04599f8642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Thu, 20 Jun 2013 09:53:22 +0200 Subject: Fix missing shortcuts for WindowContainers Change-Id: Iee2d97e1ff2b1f0c56b1dde4f3ce22a427fbe554 Reviewed-by: Gunnar Sletta --- src/widgets/kernel/qapplication.cpp | 49 +++++++++++++++++++++++-------------- src/widgets/kernel/qshortcut.cpp | 27 ++++++++++++++++++++ 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index edd7cafd83..0da9460794 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2840,6 +2840,37 @@ bool QApplication::notify(QObject *receiver, QEvent *e) break; } + switch (e->type()) { + case QEvent::KeyPress: + { + bool isWidget = receiver->isWidgetType(); + bool isWindow = receiver->isWindowType(); + bool isGraphicsWidget = false; +#ifndef QT_NO_GRAPHICSVIEW + isGraphicsWidget = !isWidget && !isWindow && qobject_cast(receiver); +#endif + if (!isWidget && !isGraphicsWidget && !isWindow) { + return d->notify_helper(receiver, e); + } + + QKeyEvent* key = static_cast(e); +#ifndef QT_NO_SHORTCUT + // Try looking for a Shortcut before sending key events + if (qApp->d_func()->shortcutMap.tryShortcutEvent(receiver, key)) + return true; +#endif + qt_in_tab_key_event = (key->key() == Qt::Key_Backtab + || key->key() == Qt::Key_Tab + || key->key() == Qt::Key_Left + || key->key() == Qt::Key_Up + || key->key() == Qt::Key_Right + || key->key() == Qt::Key_Down); + + } + default: + break; + } + bool res = false; if (!receiver->isWidgetType()) { res = d->notify_helper(receiver, e); @@ -2853,25 +2884,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) #ifndef QT_NO_GRAPHICSVIEW isGraphicsWidget = !isWidget && qobject_cast(receiver); #endif - if (!isWidget && !isGraphicsWidget) { - res = d->notify_helper(receiver, e); - break; - } - QKeyEvent* key = static_cast(e); - if (key->type()==QEvent::KeyPress) { -#ifndef QT_NO_SHORTCUT - // Try looking for a Shortcut before sending key events - if ((res = qApp->d_func()->shortcutMap.tryShortcutEvent(receiver, key))) - return res; -#endif - qt_in_tab_key_event = (key->key() == Qt::Key_Backtab - || key->key() == Qt::Key_Tab - || key->key() == Qt::Key_Left - || key->key() == Qt::Key_Up - || key->key() == Qt::Key_Right - || key->key() == Qt::Key_Down); - } bool def = key->isAccepted(); QPointer pr = receiver; while (receiver) { diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp index c5cdce3d60..471b054a99 100644 --- a/src/widgets/kernel/qshortcut.cpp +++ b/src/widgets/kernel/qshortcut.cpp @@ -51,6 +51,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -86,6 +87,20 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context) if (QApplication::activePopupWidget()) active_window = QApplication::activePopupWidget(); + if (!active_window) { + QWindow *qwindow = QGuiApplication::focusWindow(); + if (qwindow && qwindow->isActive()) { + while (qwindow) { + QWidgetWindow *widgetWindow = qobject_cast(qwindow); + if (widgetWindow) { + active_window = widgetWindow->widget(); + break; + } + qwindow = qwindow->parent(); + } + } + } + if (!active_window) return false; @@ -106,6 +121,18 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context) w = s->parentWidget(); } + if (!w) { + QWindow *qwindow = qobject_cast(object); + while (qwindow) { + QWidgetWindow *widget_window = qobject_cast(qwindow); + if (widget_window) { + w = widget_window->widget(); + break; + } + qwindow = qwindow->parent(); + } + } + if (!w) return false; -- cgit v1.2.3 From 3fb7e5aee9fb8633812884c5d49c3285e02b9d2e Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 18 Jun 2013 16:08:47 +0200 Subject: Dialogs examples: remove QLayout::SetNoConstraint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These constraints were adjusted in qt4 commit 3abaecc in order to make the dialogs fit Symbian/Maemo screens. These are not mobile oriented examples and it breaks resizing behavior on desktop so badly, that we will simply revert the constraint changes to make the dialogs respect their minimum sizes. Task-number: QTBUG-31351 Change-Id: Ibf358ddedadf05614ef7a66b6a98fe5d7073996f Reviewed-by: Thorbjørn Lund Martsum Reviewed-by: Topi Reiniö Reviewed-by: Jerome Pasion Reviewed-by: Caroline Chao --- examples/widgets/dialogs/findfiles/window.cpp | 1 - examples/widgets/dialogs/tabdialog/tabdialog.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/examples/widgets/dialogs/findfiles/window.cpp b/examples/widgets/dialogs/findfiles/window.cpp index 80894bab47..908c0c0c34 100644 --- a/examples/widgets/dialogs/findfiles/window.cpp +++ b/examples/widgets/dialogs/findfiles/window.cpp @@ -63,7 +63,6 @@ Window::Window(QWidget *parent) //! [1] QGridLayout *mainLayout = new QGridLayout; - mainLayout->setSizeConstraint(QLayout::SetNoConstraint); mainLayout->addWidget(fileLabel, 0, 0); mainLayout->addWidget(fileComboBox, 0, 1, 1, 2); mainLayout->addWidget(textLabel, 1, 0); diff --git a/examples/widgets/dialogs/tabdialog/tabdialog.cpp b/examples/widgets/dialogs/tabdialog/tabdialog.cpp index 39f74f1c6c..80d8623af5 100644 --- a/examples/widgets/dialogs/tabdialog/tabdialog.cpp +++ b/examples/widgets/dialogs/tabdialog/tabdialog.cpp @@ -65,7 +65,6 @@ TabDialog::TabDialog(const QString &fileName, QWidget *parent) //! [4] QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->setSizeConstraint(QLayout::SetNoConstraint); mainLayout->addWidget(tabWidget); mainLayout->addWidget(buttonBox); setLayout(mainLayout); -- cgit v1.2.3 From e02c6dd1d32b048f829153052259a6d097d7434b Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 7 Jun 2013 13:09:57 +0200 Subject: Mac Accessibility: skip invisible children Change-Id: I6c3da526ecef60447a658b6b5501282729e9c6f5 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | 3 +++ src/plugins/platforms/cocoa/qnsviewaccessibility.mm | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm index 55a23fda76..5309bc2ac5 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm @@ -145,6 +145,9 @@ for (int i = 0; i < numKids; ++i) { QAccessibleInterface *child = iface->child(i); Q_ASSERT(child); + if (child->state().invalid || child->state().invisible) + continue; + QAccessible::Id childId = QAccessible::uniqueId(child); //qDebug() << " kid: " << childId << child; QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithId:childId parent:self]; diff --git a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm index 331a66417d..59e39e70c7 100644 --- a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm +++ b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm @@ -82,6 +82,9 @@ for (int i = 0; i < numKids; ++i) { QAccessibleInterface *child = m_window->accessibleRoot()->child(i); Q_ASSERT(child); + if (child->state().invalid || child->state().invisible) + continue; + QAccessible::Id childAxid = QAccessible::uniqueId(child); QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithId:childAxid parent:self]; [kids addObject: element]; -- cgit v1.2.3 From 91ca90d89601468e3891d85449567b05bf64ecad Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 21 Jun 2013 14:50:06 +0200 Subject: CMake: Fix test for value starting with -L Change-Id: I02ba45beca09c2eb1b1fbdc2a8f6efbc783bd72d Reviewed-by: Oswald Buddenhagen --- mkspecs/features/cmake_functions.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf index a67fd9af9b..2dc72a7a2f 100644 --- a/mkspecs/features/cmake_functions.prf +++ b/mkspecs/features/cmake_functions.prf @@ -54,7 +54,7 @@ defineReplace(cmakeProcessLibs) { variable = $$1 out = for(v, variable) { - if(!equals(v, -framework):!equals(v, -L.*)) { + if(!equals(v, -framework):!contains(v, -L.*)) { v ~= s,^-l,, v ~= s,^-lib,, v ~= s,.lib$,, -- cgit v1.2.3 From e97c37a37ac27f9ab901e974f0a882e81ffd571d Mon Sep 17 00:00:00 2001 From: Chris Stylianou Date: Fri, 21 Jun 2013 15:02:39 +0100 Subject: Fix incorrect uname usage. The POSIX function uname() can return any non-negative value for success. - Example: Solaris 10 returns 1 on success. See: http://pubs.opengroup.org/onlinepubs/009695399/functions/uname.html Change-Id: Ic3d51f94a31d8b562b28a2d09df3d31b04c77dc8 Reviewed-by: Oswald Buddenhagen --- qmake/library/qmakeevaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index c60119615f..084750669a 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1037,7 +1037,7 @@ void QMakeEvaluator::loadDefaults() # endif #elif defined(Q_OS_UNIX) struct utsname name; - if (!uname(&name)) { + if (uname(&name) != -1) { vars[ProKey("QMAKE_HOST.os")] << ProString(name.sysname); vars[ProKey("QMAKE_HOST.name")] << ProString(QString::fromLocal8Bit(name.nodename)); vars[ProKey("QMAKE_HOST.version")] << ProString(name.release); -- cgit v1.2.3 From b87af6b5e059594183de16685379cbcc46a1fdb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 22 Mar 2013 09:35:38 +0100 Subject: Remove NSPICTPboardType from pasteboard types. NSPICTPboardType is deprecated. Mac OS will translate pasted images of that type to a different image format. Change-Id: Id7a68509615816a852abf1c11a70f0f0c862f0f2 Reviewed-by: Jake Petroules Reviewed-by: Thiago Macieira --- src/plugins/platforms/cocoa/qnsview.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index c0bf616ac3..f811c0e9b4 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -1291,7 +1291,7 @@ static QTouchDevice *touchDevice = 0; NSFilenamesPboardType, NSPostScriptPboardType, NSTIFFPboardType, NSRTFPboardType, NSTabularTextPboardType, NSFontPboardType, NSRulerPboardType, NSFileContentsPboardType, NSColorPboardType, - NSRTFDPboardType, NSHTMLPboardType, NSPICTPboardType, + NSRTFDPboardType, NSHTMLPboardType, NSURLPboardType, NSPDFPboardType, NSVCardPboardType, NSFilesPromisePboardType, NSInkTextPboardType, NSMultipleTextSelectionPboardType, mimeTypeGeneric, nil]; -- cgit v1.2.3 From 9d35442a6ebc807914f00a04b2bc654958a232cf Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 7 Jun 2013 13:52:22 +0200 Subject: Fix typo QCocoaAccessibility Change-Id: Ib3fe4e30097af9c5c577757594196710c0998184 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoaaccessibility.h | 6 +++--- src/plugins/platforms/cocoa/qcocoaaccessibility.mm | 12 ++++++------ src/plugins/platforms/cocoa/qcocoaintegration.mm | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.h b/src/plugins/platforms/cocoa/qcocoaaccessibility.h index 3f0367d36a..5529bef882 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibility.h +++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.h @@ -46,11 +46,11 @@ #include #include -class QCococaAccessibility : public QPlatformAccessibility +class QCocoaAccessibility : public QPlatformAccessibility { public: - QCococaAccessibility(); - ~QCococaAccessibility(); + QCocoaAccessibility(); + ~QCocoaAccessibility(); void notifyAccessibilityUpdate(QAccessibleEvent *event); void setRootObject(QObject *o); void initialize(); diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm index 9c38a874e5..2f9d828d8b 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm @@ -44,17 +44,17 @@ #include #include -QCococaAccessibility::QCococaAccessibility() +QCocoaAccessibility::QCocoaAccessibility() { } -QCococaAccessibility::~QCococaAccessibility() +QCocoaAccessibility::~QCocoaAccessibility() { } -void QCococaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) +void QCocoaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) { QObject *object = event->object(); if (!object) @@ -78,17 +78,17 @@ void QCococaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) } } -void QCococaAccessibility::setRootObject(QObject *o) +void QCocoaAccessibility::setRootObject(QObject *o) { Q_UNUSED(o) } -void QCococaAccessibility::initialize() +void QCocoaAccessibility::initialize() { } -void QCococaAccessibility::cleanup() +void QCocoaAccessibility::cleanup() { } diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 45038ee578..fad743439e 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -219,7 +219,7 @@ QCocoaIntegration::QCocoaIntegration() , mEventDispatcher(new QCocoaEventDispatcher()) , mInputContext(new QCocoaInputContext) #ifndef QT_NO_ACCESSIBILITY - , mAccessibility(new QCococaAccessibility) + , mAccessibility(new QCocoaAccessibility) #endif , mCocoaClipboard(new QCocoaClipboard) , mCocoaDrag(new QCocoaDrag) -- cgit v1.2.3 From af23200d1a8d9e062a39d1c6b678fde18bf6c170 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 19 Jun 2013 17:34:19 +0200 Subject: Make clients use the QT_NO_DEBUG flag when using QtCore in release mode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is similar to 9a5ade8abecd9763691127fe0f951303f5ce74bd which modified the qt5_use_modules macro. Change-Id: Ib63ee693ed2e25de6ac9d969e8be27ddbf8948c3 Reviewed-by: Peter Kümmel Reviewed-by: Stephen Kelly --- src/corelib/Qt5CoreConfigExtras.cmake.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index a80427893d..e01b448351 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -83,6 +83,8 @@ list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) !!ENDIF +set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$>:QT_NO_DEBUG>) + !!IF contains(QT_CONFIG, reduce_exports) set(QT_VISIBILITY_AVAILABLE \"True\") !!ENDIF -- cgit v1.2.3 From a4f7bb8733e048fbc6741189b7ceeb3e79af7f38 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 19 Jun 2013 12:24:57 +0200 Subject: Widgets: Set qt_button_down for each press. Do not rely on release events. Task-number: QTBUG-31333 Change-Id: I09a056fed8892715c04ca78a42ae191e5a9a3b42 Reviewed-by: Joerg Bornemann Reviewed-by: Shawn Rutledge --- src/widgets/kernel/qwidgetwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index c19b617091..18dd3156c6 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -446,7 +446,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) if (!widget) widget = m_widget; - if (event->type() == QEvent::MouseButtonPress && !qt_button_down) + if (event->type() == QEvent::MouseButtonPress) qt_button_down = widget; QWidget *receiver = QApplicationPrivate::pickMouseReceiver(m_widget, event->windowPos().toPoint(), &mapped, event->type(), event->buttons(), -- cgit v1.2.3 From d3190572cc9b10d7ae2d8a5066ef44c35056b34a Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Fri, 21 Jun 2013 00:29:07 +1000 Subject: Use BSD licensing for QtOpenGLExtensions instead of LGPL BSD licensing should be used for QtOpenGLExtensions instead of LGPL as it is a static library that is linked into applications. Using LGPL would impose additional requirements for application developers to provide object files to end users to be able to relink the application with a modified or updated QtOpenGLExtensions static library. Task-number: QTBUG-29918 Change-Id: I0bb80f8ba5158be0a71fe4c5e1c37787ce21337d Reviewed-by: Sean Harmer Reviewed-by: Lars Knoll --- src/openglextensions/qopenglextensions.cpp | 51 +++++++++++++++--------------- src/openglextensions/qopenglextensions.h | 51 +++++++++++++++--------------- util/glgen/qopenglextensions.cpp.header | 51 +++++++++++++++--------------- util/glgen/qopenglextensions.h.header | 51 +++++++++++++++--------------- 4 files changed, 100 insertions(+), 104 deletions(-) diff --git a/src/openglextensions/qopenglextensions.cpp b/src/openglextensions/qopenglextensions.cpp index 2119a86ccf..58bd31a339 100644 --- a/src/openglextensions/qopenglextensions.cpp +++ b/src/openglextensions/qopenglextensions.cpp @@ -5,35 +5,34 @@ ** ** This file is part of the QtGui module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. ** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** diff --git a/src/openglextensions/qopenglextensions.h b/src/openglextensions/qopenglextensions.h index 7d6c21e4e5..78bbf4b0cb 100644 --- a/src/openglextensions/qopenglextensions.h +++ b/src/openglextensions/qopenglextensions.h @@ -5,35 +5,34 @@ ** ** This file is part of the QtGui module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. ** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** diff --git a/util/glgen/qopenglextensions.cpp.header b/util/glgen/qopenglextensions.cpp.header index 6a9f639d5d..a3a9a9fa73 100644 --- a/util/glgen/qopenglextensions.cpp.header +++ b/util/glgen/qopenglextensions.cpp.header @@ -5,35 +5,34 @@ ** ** This file is part of the QtGui module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. ** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** diff --git a/util/glgen/qopenglextensions.h.header b/util/glgen/qopenglextensions.h.header index b83b081166..c13ba37b39 100644 --- a/util/glgen/qopenglextensions.h.header +++ b/util/glgen/qopenglextensions.h.header @@ -5,35 +5,34 @@ ** ** This file is part of the QtGui module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: ** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. ** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** -- cgit v1.2.3 From 55b933e6fbf93ed721ef6b7ecb6dce9c06f62834 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Fri, 21 Jun 2013 21:53:03 +0200 Subject: test: Skip tst_qmake::include_dir() when -no-widgets is used Only run this test case when the widgets module is present, skip it otherwise. Change-Id: I84f48b670b967af3bf0701ceba5a192f33989034 Reviewed-by: Oswald Buddenhagen --- tests/auto/tools/qmake/tst_qmake.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index 0935b1bca4..4d3b5983f0 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -314,6 +314,9 @@ void tst_qmake::export_across_file_boundaries() void tst_qmake::include_dir() { +#ifdef QT_NO_WIDGETS + QSKIP("This test depends on QtWidgets"); +#else QString workDir = base_path + "/testdata/include_dir"; QVERIFY( test_compiler.qmake( workDir, "foo" )); QVERIFY( test_compiler.make( workDir )); @@ -325,6 +328,7 @@ void tst_qmake::include_dir() QVERIFY( test_compiler.make( buildDir )); QVERIFY( test_compiler.exists( buildDir, "foo", Exe, "1.0.0" )); QVERIFY( test_compiler.makeDistClean( buildDir )); +#endif } void tst_qmake::include_pwd() -- cgit v1.2.3 From 78fe2b145eb53019783aa3c6408852ad4d25c130 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 13 Jun 2013 10:47:41 +0200 Subject: qdoc: Allow colon characters in manifest meta attribute values The current implementation does not allow colons in attribute values, as it's already used as a separator in the form of 'name:value'. This change allows colons in the value string - one use case is to have URL attributes, as in 'imageUrl:qthelp://path.to.image'. Change-Id: I05c5cb32ffc79a39fbe5e4102f7a4b5bdcc2be53 Reviewed-by: Martin Smith Reviewed-by: Jerome Pasion --- src/tools/qdoc/htmlgenerator.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 845ed35b3c..73788edb4a 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -4182,11 +4182,12 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) if (match) { tags += manifestMetaContent[idx].tags; foreach (const QString &attr, manifestMetaContent[idx].attributes) { - QStringList attrList = attr.split(QLatin1Char(':'), QString::SkipEmptyParts); + QLatin1Char div(':'); + QStringList attrList = attr.split(div); if (attrList.count() == 1) attrList.append(QStringLiteral("true")); - if (attrList.count() == 2) - writer.writeAttribute(attrList[0], attrList[1]); + QString attrName = attrList.takeFirst(); + writer.writeAttribute(attrName, attrList.join(div)); } } } -- cgit v1.2.3 From d0d158f0921fbcc67ac33eedc69684c1b3b389a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 24 Jun 2013 10:58:03 +0200 Subject: Mac: Ensure that C++11 is always used when linking against a static Qt build If Qt was built with C++11, it links to libc++, and we need all projects that use Qt to link against the same library. Technically, we could do QMAKE_LFLAGS += -stdlib=libc++, but that hasn't been tested enough without also enabling C++11, so we keep the relationship between the two for now. Change-Id: Ic628bcbade60cc82f93707f372c2119c24d9dc8a Reviewed-by: Oswald Buddenhagen Reviewed-by: Liang Qi --- mkspecs/features/mac/default_post.prf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index 0538a81771..b183814e63 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,12 +1,12 @@ load(default_post) !no_objective_c:CONFIG += objective_c -# Pick a suitable default architecture for qmake-based applications. -# If the Qt package contains one of x86 and x86_64, pick that one. If it -# contains both then use the compiler default. Make a similiar decision for -# PowerPC-based systems. Note that this logic assumes that Qt has been -# configured with an architecture that is usable on the system. qt:!isEmpty(QT_CONFIG) { + # Pick a suitable default architecture for qmake-based applications. + # If the Qt package contains one of x86 and x86_64, pick that one. If it + # contains both then use the compiler default. Make a similar decision for + # PowerPC-based systems. Note that this logic assumes that Qt has been + # configured with an architecture that is usable on the system. contains(QMAKE_HOST.arch, ppc)|contains(QMAKE_HOST.arch, "Power Macintosh") { !contains(QT_CONFIG, ppc64):contains(QT_CONFIG, ppc):CONFIG += ppc contains(QT_CONFIG, ppc64):!contains(QT_CONFIG, ppc):CONFIG += ppc64 @@ -14,6 +14,9 @@ qt:!isEmpty(QT_CONFIG) { !contains(QT_CONFIG, x86_64):contains(QT_CONFIG, x86):CONFIG += x86 contains(QT_CONFIG, x86_64):!contains(QT_CONFIG, x86):CONFIG += x86_64 } + + # Ensure that C++11 is always used when linking against a static Qt build + contains(QT_CONFIG, static):contains(QT_CONFIG, c++11): CONFIG += c++11 } isEmpty(_QMAKE_CACHE_) { -- cgit v1.2.3 From 74ca6034e413dc7ae8203d8eef1264357023d8af Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 19 Jun 2013 12:32:45 +0200 Subject: Fix QDir::mkpath failing for drive paths on Windows This fixes a regression introduced in 3e2cd8ef6f1ce4f467. We shouldn't try to call mkdir for just a drive letter. Task-number: QTBUG-31862 Change-Id: I56035857aec03f9f1cceef62e82f372486b7737b Reviewed-by: Oswald Buddenhagen Reviewed-by: Shawn Rutledge Reviewed-by: Kai Koehne --- src/corelib/io/qfilesystemengine_win.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index fdbd6e01e4..2c9ed9da3d 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -1034,6 +1034,10 @@ bool QFileSystemEngine::createDirectory(const QFileSystemEntry &entry, bool crea } if (oldslash != -1) oldslash = dirName.indexOf(QDir::separator(), oldslash); + } else if (dirName.size() > 2 + && dirName.at(1) == QLatin1Char(':')) { + // Don't try to call mkdir with just a drive letter + oldslash = 2; } for (int slash=0; slash != -1; oldslash = slash) { slash = dirName.indexOf(QDir::separator(), oldslash+1); -- cgit v1.2.3 From f125fa554199a576fc93274cfbe69c928bd009bd Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Sun, 2 Jun 2013 05:25:56 -0400 Subject: Further followup to Q_OS_MACX changes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flip !Q_OS_IOS conditions to Q_OS_MACX where it seems appropriate, remove a redundant condition in qtextcodec_p.h. Change-Id: I21c8c0c490f1eb4a9337a7f2f3e907c125489438 Reviewed-by: Tor Arne Vestbø --- src/corelib/codecs/qtextcodec_p.h | 2 +- src/corelib/global/qglobal.cpp | 2 +- src/corelib/kernel/qcore_mac_p.h | 2 +- src/corelib/thread/qthread_unix.cpp | 4 ++-- src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm | 8 ++++---- src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h | 2 +- .../kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h index 0fec1e80c7..00c067821e 100644 --- a/src/corelib/codecs/qtextcodec_p.h +++ b/src/corelib/codecs/qtextcodec_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_TEXTCODEC -#if defined(Q_OS_MAC) || defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_QNX) +#if defined(Q_OS_MAC) || defined(Q_OS_ANDROID) || defined(Q_OS_QNX) #define QT_LOCALE_IS_UTF8 #endif diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index e6da7bb32d..eb0455c31e 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1694,7 +1694,7 @@ Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) { QSysInfo::MacVersion QSysInfo::macVersion() { -#ifndef Q_OS_IOS +#ifdef Q_OS_MACX SInt32 gestalt_version; if (Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) { return QSysInfo::MacVersion(((gestalt_version & 0x00F0) >> 4) + 2); diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h index 4211a23e0f..f0899c6dee 100644 --- a/src/corelib/kernel/qcore_mac_p.h +++ b/src/corelib/kernel/qcore_mac_p.h @@ -65,7 +65,7 @@ #include "qglobal.h" -#ifndef Q_OS_IOS +#ifdef Q_OS_MACX #include #endif diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index be9b946990..6a91193785 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -83,9 +83,9 @@ # define old_qDebug qDebug # undef qDebug # endif -#ifndef Q_OS_IOS +#ifdef Q_OS_MACX # include -#endif //Q_OS_IOS +#endif // Q_OS_MACX # ifdef old_qDebug # undef qDebug diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index fbd836f763..1e15a9e62c 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -41,7 +41,7 @@ #include "qglobal.h" -#ifndef Q_OS_IOS +#ifdef Q_OS_MACX #import #import #endif @@ -107,7 +107,7 @@ static NSInteger languageMapSort(id obj1, id obj2, void *context) QCoreTextFontDatabase::QCoreTextFontDatabase() { -#ifndef Q_OS_IOS +#ifdef Q_OS_MACX QSettings appleSettings(QLatin1String("apple.com")); QVariant appleValue = appleSettings.value(QLatin1String("AppleAntiAliasingThreshold")); if (appleValue.isValid()) @@ -408,7 +408,7 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo static bool didPopulateStyleFallbacks = false; if (!didPopulateStyleFallbacks) { -#if !defined(Q_OS_IOS) +#if defined(Q_OS_MACX) // Ensure we have the psNameToFamily mapping set up const_cast(this)->populateFontDatabase(); @@ -457,7 +457,7 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo return fallbackLists[styleLookupKey.arg(styleHint)]; } -#ifndef Q_OS_IOS +#ifdef Q_OS_MACX QStringList QCoreTextFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName) { #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8 diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h index 5b9b8e2329..8536ad9123 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h @@ -55,7 +55,7 @@ public: QFontEngine *fontEngine(const QFontDef &fontDef, QChar::Script script, void *handle); QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference); QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const; -#ifndef Q_OS_IOS +#ifdef Q_OS_MACX QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName); #endif void releaseHandle(void *handle); diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp index dd24f6757e..9e03884e4e 100644 --- a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp +++ b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp @@ -380,7 +380,7 @@ void tst_QNetworkProxyFactory::genericSystemProxy() QFETCH(int, port); // The generic system proxy is only available on the following platforms -#if (!defined Q_OS_BLACKBERRY) && (!defined Q_OS_WIN) && ((!defined Q_OS_MAC) || defined Q_OS_IOS) +#if (!defined Q_OS_BLACKBERRY) && (!defined Q_OS_WIN) && (!defined Q_OS_MACX) qputenv(envVar, url); const QList systemProxy = QNetworkProxyFactory::systemProxyForQuery(); QCOMPARE(systemProxy.size(), 1); -- cgit v1.2.3 From d668e19271f4f8ac3ed754d071b91ceebf058bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 13 Jun 2013 14:18:10 +0200 Subject: Scope cached Mac SDK tool values by mkspec Otherwise doing stuff like -spec macx-g++ when the default spec is clang will not have an effect on the tools used. Change-Id: Ia2769abfdd8c19f79d427b9f09707430e736305a Reviewed-by: Oswald Buddenhagen --- mkspecs/features/mac/sdk.prf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf index 0da0b65d41..788fa5b362 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -24,10 +24,13 @@ sysrootified = for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val QMAKE_INCDIR_OPENGL = $$sysrootified +QMAKESPEC_NAME = $$basename(QMAKESPEC) + # Resolve SDK version of various tools for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB)) { - !isEmpty(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.$${tool}) { - $$tool = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.$${tool}) + tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool} + !isEmpty($$tool_variable) { + $$tool = $$eval($$tool_variable) next() } @@ -38,7 +41,7 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_ isEmpty(sysrooted): next() $$tool = $$sysrooted $$member(value, 1, -1) - !isEmpty(_QMAKE_CACHE_): cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.$${tool}, set, $$tool) + !isEmpty(_QMAKE_CACHE_): cache($$tool_variable, set, $$tool) } isEmpty(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.platform_name) { -- cgit v1.2.3 From 47ab2edd01787761e637e403d83b2094daa2722d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 13 Jun 2013 14:26:48 +0200 Subject: Make the macx-xcode spec a wrapper around the default spec ... except for MAKEFILE_GENERATOR = XCODE. This means the spec no longer hard-codes g++, and will work regardless of whether the default spec was clang or g++. This require us to set QMAKE_XCODE_GCC_VERSION properly for GCC, so that additional compilation flags passed by Xcode will match the actual compiler used. Task-number: QTBUG-31713 Change-Id: If65140a7471cd16f483036742f1d5b86d0485c52 Reviewed-by: Oswald Buddenhagen --- mkspecs/common/g++-macx.conf | 2 ++ mkspecs/features/ios/default_pre.prf | 2 +- mkspecs/macx-xcode/qmake.conf | 21 ++------------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/mkspecs/common/g++-macx.conf b/mkspecs/common/g++-macx.conf index 2955c85f5c..bae8eb0965 100644 --- a/mkspecs/common/g++-macx.conf +++ b/mkspecs/common/g++-macx.conf @@ -16,6 +16,8 @@ QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2 QMAKE_LFLAGS_STATIC_LIB += -all_load +QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvmgcc42 + QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} diff --git a/mkspecs/features/ios/default_pre.prf b/mkspecs/features/ios/default_pre.prf index fa0245aa2c..7cfbc03eb5 100644 --- a/mkspecs/features/ios/default_pre.prf +++ b/mkspecs/features/ios/default_pre.prf @@ -1,5 +1,5 @@ # Unset makefile generator, so we can auto-detect value in default_post -unset(MAKEFILE_GENERATOR) +!macx-xcode: unset(MAKEFILE_GENERATOR) load(default_pre) diff --git a/mkspecs/macx-xcode/qmake.conf b/mkspecs/macx-xcode/qmake.conf index 131619de32..7f65d263a3 100644 --- a/mkspecs/macx-xcode/qmake.conf +++ b/mkspecs/macx-xcode/qmake.conf @@ -4,23 +4,6 @@ # Mac OS X + XCode # -MAKEFILE_GENERATOR = XCODE -CONFIG += lib_version_first incremental plugin_no_soname app_bundle +include(../$$[QMAKE_XSPEC]/qmake.conf) -include(../common/macx.conf) -include(../common/gcc-base-mac.conf) -include(../common/g++-macx.conf) - -QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 - -QMAKE_LINK = -QMAKE_LINK_C = -QMAKE_LINK_C_SHLIB = -QMAKE_LINK_SHLIB = -QMAKE_CFLAGS_HIDESYMS = -QMAKE_LFLAGS_VERSION = -QMAKE_LFLAGS_COMPAT_VERSION = -QMAKE_LFLAGS_SONAME = -QMAKE_INCDIR += /usr/local/include /System/Library/Frameworks/CarbonCore.framework/Headers - -load(qt_config) +MAKEFILE_GENERATOR = XCODE -- cgit v1.2.3 From 5e4627fb852d13b57659a0889a65a177206be2cc Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 7 Jun 2013 13:53:21 +0200 Subject: Mac Accessibility: unify child functions Both ways of getting the children are the same for nsview and qcocoaaccessibleelement. Factor out a function. Change-Id: I4be091c6acde0de519a358f879c24eae04ec4c8d Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoaaccessibility.h | 1 + src/plugins/platforms/cocoa/qcocoaaccessibility.mm | 20 ++++++++++++++++++++ .../platforms/cocoa/qcocoaaccessibilityelement.mm | 20 +------------------- src/plugins/platforms/cocoa/qnsviewaccessibility.mm | 19 +------------------ 4 files changed, 23 insertions(+), 37 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.h b/src/plugins/platforms/cocoa/qcocoaaccessibility.h index 5529bef882..86bb5323a7 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibility.h +++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.h @@ -79,6 +79,7 @@ namespace QCocoaAccessible { NSString *macRole(QAccessibleInterface *interface); bool shouldBeIgnored(QAccessibleInterface *interface); +NSArray *unignoredChildren(id parentObject, QAccessibleInterface *interface); NSString *getTranslatedAction(const QString &qtAction); NSMutableArray *createTranslatedActionsList(const QStringList &qtActions); QString translateAction(NSString *nsAction); diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm index 2f9d828d8b..5649f3ad73 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm @@ -223,6 +223,26 @@ bool shouldBeIgnored(QAccessibleInterface *interface) return false; } +NSArray *unignoredChildren(id parentObject, QAccessibleInterface *interface) +{ + int numKids = interface->childCount(); + // qDebug() << "Children for: " << axid << iface << " are: " << numKids; + + NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids]; + for (int i = 0; i < numKids; ++i) { + QAccessibleInterface *child = interface->child(i); + Q_ASSERT(child); + if (child->state().invalid || child->state().invisible) + continue; + + QAccessible::Id childId = QAccessible::uniqueId(child); + //qDebug() << " kid: " << childId << child; + QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithId:childId parent:parentObject]; + [kids addObject: element]; + [element release]; + } + return NSAccessibilityUnignoredChildren(kids); +} /* Translates a predefined QAccessibleActionInterface action to a Mac action constant. Returns 0 if the Qt Action has no mac equivalent. Ownership of the NSString is diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm index 5309bc2ac5..7eae22f720 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm @@ -137,25 +137,7 @@ } else if ([attribute isEqualToString:NSAccessibilityRoleDescriptionAttribute]) { return NSAccessibilityRoleDescription(role, nil); } else if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) { - - int numKids = iface->childCount(); - // qDebug() << "Children for: " << axid << iface << " are: " << numKids; - - NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids]; - for (int i = 0; i < numKids; ++i) { - QAccessibleInterface *child = iface->child(i); - Q_ASSERT(child); - if (child->state().invalid || child->state().invisible) - continue; - - QAccessible::Id childId = QAccessible::uniqueId(child); - //qDebug() << " kid: " << childId << child; - QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithId:childId parent:self]; - [kids addObject: element]; - [element release]; - } - return NSAccessibilityUnignoredChildren(kids); - + return QCocoaAccessible::unignoredChildren(self, iface); } else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) { // Just check if the app thinks we're focused. id focusedElement = [NSApp accessibilityAttributeValue:NSAccessibilityFocusedUIElementAttribute]; diff --git a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm index 59e39e70c7..86e5066fbb 100644 --- a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm +++ b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm @@ -74,24 +74,7 @@ } else if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) { if (!m_window->accessibleRoot()) return [super accessibilityAttributeValue:attribute]; - - // Create QCocoaAccessibleElements for each child if the - // root accessible interface. - int numKids = m_window->accessibleRoot()->childCount(); - NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids]; - for (int i = 0; i < numKids; ++i) { - QAccessibleInterface *child = m_window->accessibleRoot()->child(i); - Q_ASSERT(child); - if (child->state().invalid || child->state().invisible) - continue; - - QAccessible::Id childAxid = QAccessible::uniqueId(child); - QCocoaAccessibleElement *element = [QCocoaAccessibleElement createElementWithId:childAxid parent:self]; - [kids addObject: element]; - [element release]; - } - - return NSAccessibilityUnignoredChildren(kids); + return QCocoaAccessible::unignoredChildren(self, m_window->accessibleRoot()); } else { return [super accessibilityAttributeValue:attribute]; } -- cgit v1.2.3 From 1723a9861f5f8eb537b2b39533561a86b5d389f0 Mon Sep 17 00:00:00 2001 From: Bjoern Breitmeyer Date: Thu, 16 May 2013 17:35:48 +0200 Subject: Fixed testbuild with QT_NO_CURSOR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed the QCursor entry from the list of types if QT_NO_CURSOR is set. Change-Id: I6b8e925acedec75ed6e46b2e3fe34d0011667c91 Reviewed-by: Friedemann Kleint Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Thomas McGuire Reviewed-by: Jędrzej Nowacki --- tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp index da2c961558..1839b0670c 100644 --- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp +++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp @@ -66,7 +66,7 @@ private slots: void constructCopy(); }; -#define FOR_EACH_GUI_METATYPE(F) \ +#define FOR_EACH_GUI_METATYPE_BASE(F) \ F(QFont, QFont) \ F(QPixmap, QPixmap) \ F(QBrush, QBrush) \ @@ -76,7 +76,6 @@ private slots: F(QPolygon, QPolygon) \ F(QRegion, QRegion) \ F(QBitmap, QBitmap) \ - F(QCursor, QCursor) \ F(QKeySequence, QKeySequence) \ F(QPen, QPen) \ F(QTextLength, QTextLength) \ @@ -89,6 +88,16 @@ private slots: F(QVector4D, QVector4D) \ F(QQuaternion, QQuaternion) +#ifndef QTEST_NO_CURSOR +# define FOR_EACH_GUI_METATYPE(F) \ + FOR_EACH_GUI_METATYPE_BASE(F) \ + F(QCursor, QCursor) +#else // !QTEST_NO_CURSOR +# define FOR_EACH_GUI_METATYPE(F) \ + FOR_EACH_GUI_METATYPE_BASE(F) +#endif // !QTEST_NO_CURSOR + + namespace { template struct static_assert_trigger { -- cgit v1.2.3 From bd97768ae54d643270e824f74d152892dbea1b9f Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Sun, 2 Jun 2013 06:03:08 -0400 Subject: Update for the newest Darwin-family operating systems. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib90296e35f8aa8d63692cf03ba9ffcb94a1a7687 Reviewed-by: Tor Arne Vestbø --- src/corelib/global/qglobal.cpp | 8 +++++--- src/corelib/global/qsysinfo.h | 4 +++- src/corelib/global/qsystemdetection.h | 11 ++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 6f63a0d9d3..7a00e4eb32 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1042,7 +1042,7 @@ bool qSharedBuild() Q_DECL_NOTHROW \enum QSysInfo::MacVersion This enum provides symbolic names for the various versions of the - Macintosh operating system. On Mac, the + OS X operating system. On OS X, the QSysInfo::MacintoshVersion variable gives the version of the system on which the application is run. @@ -1054,8 +1054,9 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_10_4 Mac OS X 10.4 (unsupported) \value MV_10_5 Mac OS X 10.5 (unsupported) \value MV_10_6 Mac OS X 10.6 - \value MV_10_7 Mac OS X 10.7 - \value MV_10_8 Mac OS X 10.8 + \value MV_10_7 OS X 10.7 + \value MV_10_8 OS X 10.8 + \value MV_10_9 OS X 10.9 \value MV_Unknown An unknown and currently unsupported platform \value MV_CHEETAH Apple codename for MV_10_0 @@ -1067,6 +1068,7 @@ bool qSharedBuild() Q_DECL_NOTHROW \value MV_SNOWLEOPARD Apple codename for MV_10_6 \value MV_LION Apple codename for MV_10_7 \value MV_MOUNTAINLION Apple codename for MV_10_8 + \value MV_MAVERICKS Apple codename for MV_10_9 \sa WinVersion */ diff --git a/src/corelib/global/qsysinfo.h b/src/corelib/global/qsysinfo.h index 58939cc013..a6accdfebc 100644 --- a/src/corelib/global/qsysinfo.h +++ b/src/corelib/global/qsysinfo.h @@ -132,6 +132,7 @@ public: MV_10_6 = 0x0008, MV_10_7 = 0x0009, MV_10_8 = 0x000A, + MV_10_9 = 0x000B, /* codenames */ MV_CHEETAH = MV_10_0, @@ -142,7 +143,8 @@ public: MV_LEOPARD = MV_10_5, MV_SNOWLEOPARD = MV_10_6, MV_LION = MV_10_7, - MV_MOUNTAINLION = MV_10_8 + MV_MOUNTAINLION = MV_10_8, + MV_MAVERICKS = MV_10_9 }; static const MacVersion MacintoshVersion; static MacVersion macVersion(); diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h index 690442d066..cb55fa808b 100644 --- a/src/corelib/global/qsystemdetection.h +++ b/src/corelib/global/qsystemdetection.h @@ -207,12 +207,18 @@ # if !defined(__MAC_10_8) # define __MAC_10_8 1080 # endif +# if !defined(__MAC_10_9) +# define __MAC_10_9 1090 +# endif # if !defined(MAC_OS_X_VERSION_10_7) # define MAC_OS_X_VERSION_10_7 1070 # endif # if !defined(MAC_OS_X_VERSION_10_8) # define MAC_OS_X_VERSION_10_8 1080 # endif +# if !defined(MAC_OS_X_VERSION_10_9) +# define MAC_OS_X_VERSION_10_9 1090 +# endif # # if !defined(__IPHONE_4_3) # define __IPHONE_4_3 40300 @@ -229,9 +235,12 @@ # if !defined(__IPHONE_6_1) # define __IPHONE_6_1 60100 # endif +# if !defined(__IPHONE_7_0) +# define __IPHONE_7_0 70000 +# endif # # if (__MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_8) -# warning "This version of Mac OS X is unsupported" +# warning "This version of OS X is unsupported" # endif #endif -- cgit v1.2.3 From d0e82ede558b4c7b0f1a89b28a224cf77a3fc068 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 17 Jun 2013 21:09:43 +0200 Subject: mac framework build: always set QMAKE_FRAMEWORKPATH don't mess with the -F linker flag manually. qt headers include other headers via the canonical Module/Header syntax, which means that the compiler also needs the -F flag. QMAKE_FRAMEWORKPATH does exactly that. Task-number: QTBUG-29003 Change-Id: I5f4af1a462697cd6996c54436ccdb9fc2b216020 Reviewed-by: Andy Shaw Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_functions.prf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 699c42ee1f..1d34ad5d63 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -80,10 +80,8 @@ defineTest(qtAddModule) { FRAMEWORK_INCLUDE = $${MODULE_LIBS}/$${MODULE_NAME}.framework/Headers !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) { INCLUDEPATH *= $$FRAMEWORK_INCLUDE - LINKAGE = -F$${MODULE_LIBS} - } else { - QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS} } + QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS} LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX} } } -- cgit v1.2.3 From 7090d4a4584bcde41e2156ed155127165af42e49 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 19 Jun 2013 16:35:59 +0200 Subject: un-nest conditionals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it's cleaner, and it makes it possible to actually have a single else branch. Change-Id: I5ef917b678e2bd5a2face8ee19e942e5e952aa80 Reviewed-by: Tor Arne Vestbø --- mkspecs/features/qt_functions.prf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 1d34ad5d63..d58421ea59 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -75,15 +75,13 @@ defineTest(qtAddModule) { } unset(LINKAGE) - mac { - contains(MODULE_CONFIG, lib_bundle) { + mac:contains(MODULE_CONFIG, lib_bundle) { FRAMEWORK_INCLUDE = $${MODULE_LIBS}/$${MODULE_NAME}.framework/Headers !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) { INCLUDEPATH *= $$FRAMEWORK_INCLUDE } QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS} LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX} - } } # Re-insert the major version in the library name (cf qtLibraryTarget above) -- cgit v1.2.3 From c0d5a4ee12afc602734101c8bb41d66b29a9b13c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 17 Jun 2013 21:33:06 +0200 Subject: don't needlessly do QMAKE_BUNDLE_DATA+=FRAMEWORK_HEADERS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit there is no point in adding a structure we don't actually define. Change-Id: Ica43123f17eca6ebd4b5b7ec2526ebabef31c82a Reviewed-by: Tor Arne Vestbø --- mkspecs/features/qt_module.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 429e00bed9..6567dc8657 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -97,8 +97,8 @@ mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { FRAMEWORK_HEADERS.version = Versions FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES FRAMEWORK_HEADERS.path = Headers + QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS } - QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS } } -- cgit v1.2.3 From 7ea8c9d0f07acd2b7622ce2c8bc8d7d0570a0395 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 19 Jun 2013 13:30:04 +0200 Subject: install private headers into frameworks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-31641 Change-Id: Ifadc380c0a8983b2be93194e2e2257494b13dff8 Reviewed-by: Tor Arne Vestbø --- mkspecs/features/qt_functions.prf | 4 ++++ mkspecs/features/qt_module.prf | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index d58421ea59..bbbb5d36a3 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -80,6 +80,10 @@ defineTest(qtAddModule) { !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) { INCLUDEPATH *= $$FRAMEWORK_INCLUDE } + auto_use_privates|isEqual(2, UsePrivate): \ + INCLUDEPATH += \ + $$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION) \ + $$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION)/$$MODULE_NAME QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS} LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX} } diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 6567dc8657..20a7c0e81f 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -97,7 +97,10 @@ mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { FRAMEWORK_HEADERS.version = Versions FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES FRAMEWORK_HEADERS.path = Headers - QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS + FRAMEWORK_PRIVATE_HEADERS.version = Versions + FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES + FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME + QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS } } } -- cgit v1.2.3 From 6d61dfdbb74a2055438b999c6962f89cc3388eea Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 14:25:20 +0200 Subject: disable non-framework header install also for debug builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit i see no particular reason why debug builds should still get "normal" headers. Change-Id: I3625648549e8c234a365bab26823190ed2219cdf Reviewed-by: Tor Arne Vestbø --- mkspecs/features/qt_module.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 20a7c0e81f..d349c26e53 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -91,9 +91,9 @@ else: \ mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { #QMAKE_FRAMEWORK_VERSION = 4.0 CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework + CONFIG -= qt_install_headers #no need to install these as well CONFIG(release, debug|release) { !debug_and_release|build_pass { - CONFIG -= qt_install_headers #no need to install these as well FRAMEWORK_HEADERS.version = Versions FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES FRAMEWORK_HEADERS.path = Headers -- cgit v1.2.3 From 01270cf6723fa3951b2129deeb0e3c1983448f63 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 14:36:10 +0200 Subject: fix bundled header creation for debug builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the only case where we want to skip copying the bundled data (which is an optimization only) is the debug sub-build when we are actually building both debug and release. Change-Id: I1f3f67ccd9a64033b133ffaf58639cd9f7107c27 Reviewed-by: Tor Arne Vestbø --- mkspecs/features/qt_module.prf | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index d349c26e53..46f8e56ad5 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -92,16 +92,14 @@ mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { #QMAKE_FRAMEWORK_VERSION = 4.0 CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework CONFIG -= qt_install_headers #no need to install these as well - CONFIG(release, debug|release) { - !debug_and_release|build_pass { - FRAMEWORK_HEADERS.version = Versions - FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES - FRAMEWORK_HEADERS.path = Headers - FRAMEWORK_PRIVATE_HEADERS.version = Versions - FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES - FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME - QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS - } + !debug_and_release|if(build_all:CONFIG(release, debug|release)) { + FRAMEWORK_HEADERS.version = Versions + FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES + FRAMEWORK_HEADERS.path = Headers + FRAMEWORK_PRIVATE_HEADERS.version = Versions + FRAMEWORK_PRIVATE_HEADERS.files = $$SYNCQT.PRIVATE_HEADER_FILES + FRAMEWORK_PRIVATE_HEADERS.path = Headers/$$VERSION/$$MODULE_INCNAME + QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS FRAMEWORK_PRIVATE_HEADERS } } -- cgit v1.2.3 From 63601509f89f250b7768f79d42b22f95eb1b4c4c Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 17 Jun 2013 09:54:46 +0200 Subject: Test for activation and palette on QWindowContainer's parent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-31775 Change-Id: Ib8ec5508f7bf53f9e3ce502367a3dca1a760289f Reviewed-by: Jørgen Lind --- .../widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp index 440639cd49..2d9cb98e27 100644 --- a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp +++ b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp @@ -192,6 +192,11 @@ void tst_QWindowContainer::testActivation() QVERIFY(QTest::qWaitForWindowActive(root.windowHandle())); QVERIFY(QGuiApplication::focusWindow() == root.windowHandle()); + // Verify that all states in the root widget indicate it is active + QVERIFY(root.windowHandle()->isActive()); + QVERIFY(root.isActiveWindow()); + QCOMPARE(root.palette().currentColorGroup(), QPalette::Active); + // Under KDE (ubuntu 12.10), we experience that doing two activateWindow in a row // does not work. The second gets ignored by the window manager, even though the // timestamp in the xcb connection is unique for both. @@ -201,6 +206,11 @@ void tst_QWindowContainer::testActivation() window->requestActivate(); QVERIFY(QTest::qWaitForWindowActive(window)); QVERIFY(QGuiApplication::focusWindow() == window); + + // Verify that all states in the root widget still indicate it is active + QVERIFY(root.windowHandle()->isActive()); + QVERIFY(root.isActiveWindow()); + QCOMPARE(root.palette().currentColorGroup(), QPalette::Active); } -- cgit v1.2.3 From 6811920dea2e864dc2b7231c18c8b72af5cab7f5 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 24 Jun 2013 16:09:49 +0200 Subject: Fix QWidget::isActiveWindow for window containers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If0e8b83d7dc84b66f4ce5a5cd98affa4bd9b7424 Reviewed-by: Jørgen Lind --- src/widgets/kernel/qwidget.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index cfccce7c41..1c4ae9c8a2 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -104,6 +104,8 @@ #include "qtabwidget.h" // Needed in inTabWidget() #endif // QT_KEYPAD_NAVIGATION +#include "qwindowcontainer_p.h" + // widget/widget data creation count //#define QWIDGET_EXTRA_DEBUG @@ -6249,6 +6251,17 @@ bool QWidget::isActiveWindow() const } } + // Check for an active window container + if (QWindow *ww = QGuiApplication::focusWindow()) { + while (ww) { + QWidgetWindow *qww = qobject_cast(ww); + QWindowContainer *qwc = qww ? qobject_cast(qww->widget()) : 0; + if (qwc && qwc->topLevelWidget() == tlw) + return true; + ww = ww->parent(); + } + } + // Check if platform adaptation thinks the window is active. This is necessary for // example in case of ActiveQt servers that are embedded into another application. // Those are separate processes that are not part of the parent application Qt window/widget -- cgit v1.2.3 From 1b972b210ae1611b2ee07e1c3f545963c7cc31e7 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Fri, 21 Jun 2013 14:40:32 +0200 Subject: config.tests: Fix architecture detection on Solaris Escaping the '=' signs, otherwise awk fails on Solaris with awk: syntax error near line 1 awk: bailing out near line 1 Could not determine the target architecture! Build type: solaris-g++ (unknown, CPU features:) Change-Id: I201482395c0cec28c10853191032eaa0401f5beb Reviewed-by: Oswald Buddenhagen --- config.tests/unix/arch.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test index e65541cda7..3efd6f4f25 100755 --- a/config.tests/unix/arch.test +++ b/config.tests/unix/arch.test @@ -44,8 +44,8 @@ else fi if strings - $binary 2>/dev/null | \ - awk -F: '/==Qt=magic=Qt== Architecture/ { print "'$VARPREFIX'_ARCH=\"" $2 "\"" } - /==Qt=magic=Qt== Sub-architecture/ { print "'$VARPREFIX'_CPUFEATURES=\"" $2 "\"" }' > "$RESULTFILE" + awk -F: '/\=\=Qt\=magic\=Qt\=\= Architecture/ { print "'$VARPREFIX'_ARCH=\"" $2 "\"" } + /\=\=Qt\=magic\=Qt\=\= Sub-architecture/ { print "'$VARPREFIX'_CPUFEATURES=\"" $2 "\"" }' > "$RESULTFILE" then [ "$VERBOSE" = "yes" ] && echo " Found architecture in binary" && \ cat "$RESULTFILE" -- cgit v1.2.3 From 28a7af7b2ae1accec904b276d3bd240608d3a73f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 18 Jun 2013 08:58:31 +0200 Subject: basic manifest tool support in vc(x)proj generator The removal of embed_manifest_dll or embed_manifest_exe from CONFIG now disables the embedding of manifests in VS project files. Task-number: QTBUG-5301 Change-Id: I031318883edca6f9b63a7981ef6c44e3f123f6fd Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msbuild_objectmodel.cpp | 3 +++ qmake/generators/win32/msvc_objectmodel.cpp | 28 ++++++++++++++++++++++++++ qmake/generators/win32/msvc_objectmodel.h | 12 +++++++++++ qmake/generators/win32/msvc_vcproj.cpp | 14 +++++++++++++ qmake/generators/win32/msvc_vcproj.h | 1 + 5 files changed, 58 insertions(+) diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 44fbf20f81..49b601e7e5 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE const char _CLCompile[] = "ClCompile"; const char _ItemGroup[] = "ItemGroup"; const char _Link[] = "Link"; +const char _ManifestTool[] = "ManifestTool"; const char _Midl[] = "Midl"; const char _ResourceCompile[] = "ResourceCompile"; @@ -104,6 +105,7 @@ const char _DisableSpecificWarnings[] = "DisableSpecificWarnings"; const char _DisplayLibrary[] = "DisplayLibrary"; const char _DLLDataFileName[] = "DLLDataFileName"; const char _EmbedManagedResourceFile[] = "EmbedManagedResourceFile"; +const char _EmbedManifest[] = "EmbedManifest"; const char _EnableCOMDATFolding[] = "EnableCOMDATFolding"; const char _EnableUAC[] = "EnableUAC"; const char _EnableErrorChecks[] = "EnableErrorChecks"; @@ -1657,6 +1659,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCConfiguration &tool) << attrTagS(_UseOfATL, toString(tool.UseOfATL)) << attrTagS(_UseOfMfc, toString(tool.UseOfMfc)) << attrTagT(_WholeProgramOptimization, tool.WholeProgramOptimization) + << attrTagT(_EmbedManifest, tool.manifestTool.EmbedManifest) << closetag(); } diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 725aba26a2..4dbba6d974 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -97,6 +97,7 @@ const char _Description[] = "Description"; const char _Detect64BitPortabilityProblems[] = "Detect64BitPortabilityProblems"; const char _DisableLanguageExtensions[] = "DisableLanguageExtensions"; const char _DisableSpecificWarnings[] = "DisableSpecificWarnings"; +const char _EmbedManifest[] = "EmbedManifest"; const char _EnableCOMDATFolding[] = "EnableCOMDATFolding"; const char _EnableErrorChecks[] = "EnableErrorChecks"; const char _EnableEnhancedInstructionSet[] = "EnableEnhancedInstructionSet"; @@ -224,6 +225,7 @@ const char _ValidateParameters[] = "ValidateParameters"; const char _VCCLCompilerTool[] = "VCCLCompilerTool"; const char _VCLibrarianTool[] = "VCLibrarianTool"; const char _VCLinkerTool[] = "VCLinkerTool"; +const char _VCManifestTool[] = "VCManifestTool"; const char _VCCustomBuildTool[] = "VCCustomBuildTool"; const char _VCResourceCompilerTool[] = "VCResourceCompilerTool"; const char _VCMIDLTool[] = "VCMIDLTool"; @@ -1718,6 +1720,23 @@ bool VCLinkerTool::parseOption(const char* option) return found; } +// VCManifestTool --------------------------------------------------- +VCManifestTool::VCManifestTool() + : EmbedManifest(unset) +{ +} + +VCManifestTool::~VCManifestTool() +{ +} + +bool VCManifestTool::parseOption(const char *option) +{ + Q_UNUSED(option); + // ### implement if we introduce QMAKE_MT_FLAGS + return false; +} + // VCMIDLTool ------------------------------------------------------- VCMIDLTool::VCMIDLTool() : DefaultCharType(midlCharUnsigned), @@ -2633,6 +2652,14 @@ void VCProjectWriter::write(XmlOutput &xml, const VCLinkerTool &tool) << closetag(_Tool); } +void VCProjectWriter::write(XmlOutput &xml, const VCManifestTool &tool) +{ + xml << tag(_Tool) + << attrS(_Name, _VCManifestTool) + << attrT(_EmbedManifest, tool.EmbedManifest) + << closetag(_Tool); +} + void VCProjectWriter::write(XmlOutput &xml, const VCMIDLTool &tool) { xml << tag(_Tool) @@ -2764,6 +2791,7 @@ void VCProjectWriter::write(XmlOutput &xml, const VCConfiguration &tool) write(xml, tool.librarian); else write(xml, tool.linker); + write(xml, tool.manifestTool); write(xml, tool.idl); write(xml, tool.postBuild); write(xml, tool.preBuild); diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index d289afe366..e60fb1dfca 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -675,6 +675,16 @@ public: VCConfiguration* config; }; +class VCManifestTool : public VCToolBase +{ +public: + VCManifestTool(); + ~VCManifestTool(); + bool parseOption(const char* option); + + triState EmbedManifest; +}; + class VCMIDLTool : public VCToolBase { public: @@ -874,6 +884,7 @@ public: VCCLCompilerTool compiler; VCLinkerTool linker; VCLibrarianTool librarian; + VCManifestTool manifestTool; VCCustomBuildTool custom; VCMIDLTool idl; VCPostBuildEventTool postBuild; @@ -1127,6 +1138,7 @@ public: virtual void write(XmlOutput &, const VCCLCompilerTool &); virtual void write(XmlOutput &, const VCLinkerTool &); + virtual void write(XmlOutput &, const VCManifestTool &); virtual void write(XmlOutput &, const VCMIDLTool &); virtual void write(XmlOutput &, const VCCustomBuildTool &); virtual void write(XmlOutput &, const VCLibrarianTool &); diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 17c72fa5d0..20ff9073f9 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -925,6 +925,7 @@ void VcprojGenerator::initConfiguration() conf.linker.GenerateDebugInformation = isDebug ? _True : _False; initLinkerTool(); } + initManifestTool(); initResourceTool(); initIDLTool(); @@ -1045,6 +1046,19 @@ void VcprojGenerator::initLibrarianTool() conf.librarian.AdditionalOptions += project->values("QMAKE_LIBFLAGS").toQStringList(); } +void VcprojGenerator::initManifestTool() +{ + VCManifestTool &tool = vcProject.Configuration.manifestTool; + const ProString tmplt = project->first("TEMPLATE"); + if ((tmplt == "vclib" + && !project->isActiveConfig("embed_manifest_dll") + && !project->isActiveConfig("static")) + || (tmplt == "vcapp" + && !project->isActiveConfig("embed_manifest_exe"))) { + tool.EmbedManifest = _False; + } +} + void VcprojGenerator::initLinkerTool() { VCConfiguration &conf = vcProject.Configuration; diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index f36d1632cf..62a2da9629 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -102,6 +102,7 @@ protected: void initCompilerTool(); void initLinkerTool(); void initLibrarianTool(); + void initManifestTool(); void initResourceTool(); void initIDLTool(); void initCustomBuildTool(); -- cgit v1.2.3 From 3ffc86e0e6d327d71782cbf84f1d62d4ad484bb0 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 25 Jun 2013 10:00:50 +0200 Subject: install qconfig.h into framework bundles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-31969 Change-Id: I5ade18352a9989bdfd513c51c021d475f39aa7c6 Reviewed-by: Tor Arne Vestbø --- src/corelib/global/global.pri | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 4084d4f2ad..a0842a946d 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -30,9 +30,12 @@ SOURCES += \ INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global # configure creates these, not syncqt, so we need to manually inject them -targ_headers.files += \ +qconfig_h_files = \ $$OUT_PWD/global/qconfig.h \ $$QT_BUILD_TREE/include/QtCore/QtConfig +targ_headers.files += $$qconfig_h_files +contains(QMAKE_BUNDLE_DATA, FRAMEWORK_HEADERS): \ + FRAMEWORK_HEADERS.files += $$qconfig_h_files # Only used on platforms with CONFIG += precompile_header PRECOMPILED_HEADER = global/qt_pch.h -- cgit v1.2.3 From 6f0d258424a6c95a30ad63ae563f38e38ef47d7c Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Mon, 17 Jun 2013 12:01:00 +0200 Subject: Fixed qrawfont auto test Number literals are always interpreted as double. This lead to errors on platforms that define qreal as float. Change-Id: I838f690c33bb97e39a2cca2cfd3bdfb9482bc2b2 Reviewed-by: Peter Hartmann Reviewed-by: Konstantin Ritt Reviewed-by: Thomas McGuire --- tests/auto/gui/text/qrawfont/tst_qrawfont.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp index fb5bb18f87..ae6e450301 100644 --- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp +++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp @@ -215,8 +215,8 @@ void tst_QRawFont::correctFontData_data() << QFont::StyleNormal << QFont::Normal << QFont::HintingPreference(*hintingPreference) - << 1000.0 - << 10.0; + << qreal(1000.0) + << qreal(10.0); fileName = testFontBoldItalic; title = fileName @@ -229,8 +229,8 @@ void tst_QRawFont::correctFontData_data() << QFont::StyleItalic << QFont::Bold << QFont::HintingPreference(*hintingPreference) - << 1000.0 - << 10.0; + << qreal(1000.0) + << qreal(10.0); ++hintingPreference; } -- cgit v1.2.3 From 7ead3a39c71949e28d682f893f8b4037e25d7259 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 21 Jun 2013 08:54:47 +0200 Subject: Windows: Display a message box if platform plugin cannot be found. Task-number: QTBUG-31765 Task-number: QTBUG-31760 Change-Id: Iadfabccf7be755564e313a8f0c128f533b9bd024 Reviewed-by: Kai Koehne --- src/gui/kernel/qguiapplication.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 77c9978a9e..89664447c4 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -94,9 +94,12 @@ #include #endif -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) # include "private/qcore_mac_p.h" -#endif +#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) +# include +# include +#endif // Q_OS_WIN && !Q_OS_WINCE QT_BEGIN_NAMESPACE @@ -789,6 +792,12 @@ static void init_platform(const QString &pluginArgument, const QString &platform fatalMessage += QStringLiteral("Available platforms are: %1\n").arg( keys.join(QStringLiteral(", "))); fatalMessage += QStringLiteral("GUI applications require a platform plugin. Terminating."); +#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) + // Windows: Display message box unless it is a console application + // or debug build showing an assert box. + if (!QLibraryInfo::isDebugBuild() && !GetConsoleWindow()) + MessageBox(0, (LPCTSTR)fatalMessage.utf16(), (LPCTSTR)(QCoreApplication::applicationName().utf16()), MB_OK | MB_ICONERROR); +#endif // Q_OS_WIN && !Q_OS_WINCE qFatal("%s", qPrintable(fatalMessage)); return; } -- cgit v1.2.3 From d849f3332f4e481dc7481dc1969be4665b11dfb3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 25 Jun 2013 17:06:24 +0200 Subject: tst_qfilefialog: Fix leaking temporary directories. The test currently leaks 2 directories QFileDialogTestDir, QFileDialogTestDir4SelectFiles in /tmp. Change-Id: I396f0b069572a680d81206dd0f1ddf606cbbe9e4 Reviewed-by: David Faure (KDE) --- .../dialogs/qfiledialog/tst_qfiledialog.cpp | 44 ++++++++-------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp index d797c553db..65d36247f6 100644 --- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -441,33 +442,25 @@ void tst_QFiledialog::completer_data() void tst_QFiledialog::completer() { + typedef QSharedPointer TemporaryFilePtr; + QFETCH(QString, input); QFETCH(QString, startPath); QFETCH(int, expected); - QString tempPath = QDir::tempPath() + '/' + "QFileDialogTestDir"; - if (startPath.isEmpty()) - startPath = tempPath; + QTemporaryDir tempDir; + QVERIFY(tempDir.isValid()); - startPath = QDir::cleanPath(startPath); + const QString tempPath = tempDir.path(); + startPath = startPath.isEmpty() ? tempPath : QDir::cleanPath(startPath); // make temp dir and files - { - QDir cleanup(tempPath); - QStringList x = cleanup.entryList(); - for (int i = 0; i < x.count(); ++i) - QFile::remove(tempPath + '/' + x[i]); - cleanup.rmdir(tempPath); - } - QDir tmp(QDir::tempPath()); - if (!tmp.exists(tempPath)) - QVERIFY(tmp.mkdir("QFileDialogTestDir")); - QList files; + QList files; QT_TRY { for (int i = 0; i < 10; ++i) { - QScopedPointer file(new QTemporaryFile(tempPath + "/rXXXXXX")); - file->open(); - files.append(file.take()); + TemporaryFilePtr file(new QTemporaryFile(tempPath + QStringLiteral("/rXXXXXX"))); + QVERIFY(file->open()); + files.append(file); } // ### flesh this out more @@ -515,7 +508,7 @@ void tst_QFiledialog::completer() QStringList expectedFiles; if (expected == -1) { - QString fullPath = startPath.isEmpty() ? tempPath : startPath; + QString fullPath = startPath; if (!fullPath.endsWith(QLatin1Char('/'))) fullPath.append(QLatin1Char('/')); fullPath.append(input); @@ -551,10 +544,8 @@ void tst_QFiledialog::completer() QTRY_COMPARE(cModel->rowCount(), expected); } QT_CATCH(...) { - qDeleteAll(files); QT_RETHROW; } - qDeleteAll(files); } void tst_QFiledialog::completer_up() @@ -888,9 +879,9 @@ void tst_QFiledialog::selectFiles() { QNonNativeFileDialog fd; fd.setViewMode(QFileDialog::List); - QString tempPath = QDir::tempPath() + '/' + "QFileDialogTestDir4SelectFiles"; - QDir dir; - QVERIFY(dir.mkpath(tempPath)); + QTemporaryDir tempDir; + QVERIFY(tempDir.isValid()); + const QString tempPath = tempDir.path(); fd.setDirectory(tempPath); QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString))); QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString))); @@ -934,15 +925,12 @@ void tst_QFiledialog::selectFiles() QCOMPARE(spyDirectoryEntered.count(), 0); QCOMPARE(spyFilesSelected.count(), 0); QCOMPARE(spyFilterSelected.count(), 0); - for (int i=0; i < 5; ++i) - QFile::remove(filesPath + QString::fromLatin1("/qfiledialog_auto_test_not_pres_%1").arg(i)); //If the selection is invalid then we fill the line edit but without the / QNonNativeFileDialog * dialog = new QNonNativeFileDialog( 0, "Save" ); dialog->setFileMode( QFileDialog::AnyFile ); dialog->setAcceptMode( QFileDialog::AcceptSave ); - QString temporary = QDir::tempPath() + QLatin1String("/blah"); - dialog->selectFile(temporary); + dialog->selectFile(tempPath + QStringLiteral("/blah")); dialog->show(); QVERIFY(QTest::qWaitForWindowExposed(dialog)); QLineEdit *lineEdit = dialog->findChild("fileNameEdit"); -- cgit v1.2.3 From 6e2d7a612bf7c2597afd6ad9dbce7b0511fd8b2d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 25 Jun 2013 12:01:43 +0200 Subject: QtPrintSupport: Initialize UI of widget-based dialog. Remove virtual from QPageSetupDialogPrivate::init() (which was called from the constructor) and keep it as a non-virtual function for QUnixPageSetupDialogPrivate. Fix breakage introduced by 54b899f44877d87f6118b1bab02fb67c35d738e8 . Task-number: QTBUG-31790 Change-Id: I6d552bc250e4d72c1bb50eceadd2852b1b957aea Reviewed-by: Lars Knoll --- src/printsupport/dialogs/qpagesetupdialog.cpp | 5 ----- src/printsupport/dialogs/qpagesetupdialog_p.h | 1 - src/printsupport/dialogs/qpagesetupdialog_unix.cpp | 4 ++++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/printsupport/dialogs/qpagesetupdialog.cpp b/src/printsupport/dialogs/qpagesetupdialog.cpp index a05099fa08..6fa901fc45 100644 --- a/src/printsupport/dialogs/qpagesetupdialog.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog.cpp @@ -104,11 +104,6 @@ QT_BEGIN_NAMESPACE QPageSetupDialogPrivate::QPageSetupDialogPrivate(QPrinter *prntr) : printer(0), ownsPrinter(false) { setPrinter(prntr); - init(); -} - -void QPageSetupDialogPrivate::init() -{ } void QPageSetupDialogPrivate::setPrinter(QPrinter *newPrinter) diff --git a/src/printsupport/dialogs/qpagesetupdialog_p.h b/src/printsupport/dialogs/qpagesetupdialog_p.h index eb672cc752..ba2f0da06a 100644 --- a/src/printsupport/dialogs/qpagesetupdialog_p.h +++ b/src/printsupport/dialogs/qpagesetupdialog_p.h @@ -73,7 +73,6 @@ class QPageSetupDialogPrivate : public QDialogPrivate public: QPageSetupDialogPrivate(QPrinter *printer); - virtual void init(); void setPrinter(QPrinter *newPrinter); QPrinter *printer; diff --git a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp index 1e0251c6d2..1add522cb8 100644 --- a/src/printsupport/dialogs/qpagesetupdialog_unix.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog_unix.cpp @@ -574,14 +574,18 @@ void QPageSetupWidget::setRightMargin(double newValue) QPageSetupDialog::QPageSetupDialog(QPrinter *printer, QWidget *parent) : QDialog(*(new QUnixPageSetupDialogPrivate(printer)), parent) { + Q_D(QPageSetupDialog); setWindowTitle(QCoreApplication::translate("QPrintPreviewDialog", "Page Setup")); + static_cast(d)->init(); } QPageSetupDialog::QPageSetupDialog(QWidget *parent) : QDialog(*(new QUnixPageSetupDialogPrivate(0)), parent) { + Q_D(QPageSetupDialog); setWindowTitle(QCoreApplication::translate("QPrintPreviewDialog", "Page Setup")); + static_cast(d)->init(); } int QPageSetupDialog::exec() -- cgit v1.2.3 From 9f681e7a50adc14e8f2f0cea676ab0909c5863aa Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 14:50:00 +0200 Subject: remove pointless variables Change-Id: Ia4cd2292bdea49c198ee1429ab4d3f87697c3ed1 Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 0ac3730b4e..a6e0727b02 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3958,15 +3958,11 @@ void Configure::generateMakefiles() QString pwd = QDir::currentPath(); { - QString dirName; bool generate = true; bool doDsp = (dictionary["VCPROJFILES"] == "yes" && dictionary["PROCESS"] == "full"); while (generate) { - QString pwd = QDir::currentPath(); - QString dirPath = buildPath + dirName; QStringList args; - args << buildPath + "/bin/qmake"; if (doDsp) { @@ -3985,7 +3981,7 @@ void Configure::generateMakefiles() args << "-o"; args << buildPath; - QDir::setCurrent(dirPath); + QDir::setCurrent(buildPath); if (int exitCode = Environment::execute(args, QStringList(), QStringList())) { cout << "Qmake failed, return code " << exitCode << endl << endl; dictionary[ "DONE" ] = "error"; -- cgit v1.2.3 From cb37a0ef5c1e4bac97d1eae9d83f6d59964a37a1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 14:52:22 +0200 Subject: simplify qmake call the directory is sufficient nowadays. the unix configure already did it that way. Change-Id: I887e5ad594aef1f7bf5f4f92a6bdf0a13e4d0372 Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a6e0727b02..ac7fbda197 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3977,7 +3977,7 @@ void Configure::generateMakefiles() } if (dictionary[ "PROCESS" ] == "full") args << "-r"; - args << (sourcePath + "/qtbase.pro"); + args << sourcePath; args << "-o"; args << buildPath; -- cgit v1.2.3 From fb6d46131ffc65271684ca39af3ec49d34e6725a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 14:55:14 +0200 Subject: remove pointless qmake -o argument it's already done by the working directory. the unix configure already did it that way. Change-Id: Ia88d0877a2e24bc40a7083c2164982dec47f913b Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index ac7fbda197..fbf0de4dce 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3978,8 +3978,6 @@ void Configure::generateMakefiles() if (dictionary[ "PROCESS" ] == "full") args << "-r"; args << sourcePath; - args << "-o"; - args << buildPath; QDir::setCurrent(buildPath); if (int exitCode = Environment::execute(args, QStringList(), QStringList())) { -- cgit v1.2.3 From e9d539623aa97b307a0d5d7cd10dbdf392e9b92f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 15:11:11 +0200 Subject: introduce "secret" configure -top-level option shifts the makefile generation one directory level up. this allows the top-level configure to leave the makefile creation entirely to the qtbase configure. this is not very clean modularization-wise, but consistent with -skip. Change-Id: I7ee2d2f29f2e6619d61fe9b55faa0bacdf3c44c1 Reviewed-by: Joerg Bornemann --- configure | 20 ++++++++++++++++++-- tools/configure/configureapp.cpp | 15 +++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 13e6fd016a..58c1eb2ce5 100755 --- a/configure +++ b/configure @@ -61,6 +61,13 @@ if [ -f "$LICENSE_FILE" ]; then diff "${LICENSE_FILE}.tmp" "${LICENSE_FILE}" >/dev/null 2>&1 || LICENSE_FILE="${LICENSE_FILE}.tmp" fi +# do this early so we don't store it in config.status +CFG_TOPLEVEL= +if [ x"$1" = x"-top-level" ]; then + CFG_TOPLEVEL=yes + shift +fi + # later cache the command line in config.status OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"` @@ -6910,14 +6917,23 @@ rm -f "$QMAKE_VARS_FILE" 2>/dev/null #------------------------------------------------------------------------------- if [ "$CFG_PROCESS" != "no" ]; then +( # fork to make the cd stay local + + relpathMangled=$relpath + if [ -n "$CFG_TOPLEVEL" ]; then + relpathMangled=`dirname "$relpath"` + cd .. + fi if [ "$CFG_PROCESS" = "full" ]; then echo "Creating makefiles. Please wait..." - "$outpath/bin/qmake" -r "$relpath" + "$outpath/bin/qmake" -r "$relpathMangled" echo "Done" else - "$outpath/bin/qmake" "$relpath" + "$outpath/bin/qmake" "$relpathMangled" fi + +) fi #------------------------------------------------------------------------------- diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index fbf0de4dce..73ef0dcf23 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -389,6 +389,11 @@ QString Configure::firstLicensePath() void Configure::parseCmdLine() { + if (configCmdLine.size() && configCmdLine.at(0) == "-top-level") { + dictionary[ "TOPLEVEL" ] = "yes"; + configCmdLine.removeAt(0); + } + int argCount = configCmdLine.size(); int i = 0; const QStringList imageFormats = QStringList() << "gif" << "png" << "jpeg"; @@ -3958,6 +3963,12 @@ void Configure::generateMakefiles() QString pwd = QDir::currentPath(); { + QString sourcePathMangled = sourcePath; + QString buildPathMangled = buildPath; + if (dictionary.contains("TOPLEVEL")) { + sourcePathMangled = QFileInfo(sourcePath).path(); + buildPathMangled = QFileInfo(buildPath).path(); + } bool generate = true; bool doDsp = (dictionary["VCPROJFILES"] == "yes" && dictionary["PROCESS"] == "full"); @@ -3977,9 +3988,9 @@ void Configure::generateMakefiles() } if (dictionary[ "PROCESS" ] == "full") args << "-r"; - args << sourcePath; + args << sourcePathMangled; - QDir::setCurrent(buildPath); + QDir::setCurrent(buildPathMangled); if (int exitCode = Environment::execute(args, QStringList(), QStringList())) { cout << "Qmake failed, return code " << exitCode << endl << endl; dictionary[ "DONE" ] = "error"; -- cgit v1.2.3 From a98b60edfcdc5c84da6d34613a44da207e07d15e Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 25 Jun 2013 15:58:47 +0200 Subject: QMacStyle: fix auto-default button animation Make sure to stop any previously active (auto-default button) animation when the auto-default button changes. Task-number: QTBUG-31668 Change-Id: Iaa9bfa485b11e49cd7f765d0e54b4e6391ad2f6d Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qmacstyle_mac.mm | 23 +++++++++++++++-------- src/widgets/styles/qmacstyle_mac_p_p.h | 2 ++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index f8905b1b1a..dad4e57d13 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -1630,6 +1630,19 @@ void QMacStylePrivate::getSliderInfo(QStyle::ComplexControl cc, const QStyleOpti } } +void QMacStylePrivate::setAutoDefaultButton(QObject *button) const +{ + if (autoDefaultButton != button) { + if (QStyleAnimation *anim = animation(autoDefaultButton)) { + anim->updateTarget(); + stopAnimation(autoDefaultButton); + } + autoDefaultButton = button; + } + if (autoDefaultButton && !animation(autoDefaultButton)) + startAnimation(new QStyleAnimation(autoDefaultButton)); +} + QMacStylePrivate::QMacStylePrivate() : mouseDown(false) { @@ -3497,15 +3510,9 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter // takes precedence over a normal default button if (btn->features & QStyleOptionButton::AutoDefaultButton && opt->state & State_Active && opt->state & State_HasFocus) { - d->autoDefaultButton = opt->styleObject; - if (!d->animation(opt->styleObject)) - d->startAnimation(new QStyleAnimation(opt->styleObject)); + d->setAutoDefaultButton(opt->styleObject); } else if (d->autoDefaultButton == opt->styleObject) { - if (QStyleAnimation *animation = d->animation(opt->styleObject)) { - animation->updateTarget(); - d->stopAnimation(opt->styleObject); - } - d->autoDefaultButton = 0; + d->setAutoDefaultButton(0); } if (!d->autoDefaultButton) { diff --git a/src/widgets/styles/qmacstyle_mac_p_p.h b/src/widgets/styles/qmacstyle_mac_p_p.h index bf42087fcb..efeaa66e39 100644 --- a/src/widgets/styles/qmacstyle_mac_p_p.h +++ b/src/widgets/styles/qmacstyle_mac_p_p.h @@ -194,6 +194,8 @@ public: HIThemeButtonDrawInfo *bdi) const; QPixmap generateBackgroundPattern() const; + void setAutoDefaultButton(QObject *button) const; + public: mutable QPointer pressedButton; mutable QPointer defaultButton; -- cgit v1.2.3 From fb2a25e7564f4651beb955fd3ecb2e644b16d80d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 26 Jun 2013 12:21:49 +0200 Subject: Windows XP: Fix directory chooser dialog. Set initial directory and title correctly in native file dialog. Task-number: QTBUG-31098 Change-Id: I87c4383bdf0b26beda6a075a186d0a951c86f8a7 Reviewed-by: Joerg Bornemann --- src/plugins/platforms/windows/qwindowsdialoghelpers.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index f7ccb00233..12dd00f104 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1720,7 +1720,9 @@ int QWindowsXpNativeFileDialog::existingDirCallback(HWND hwnd, UINT uMsg, LPARAM { switch (uMsg) { case BFFM_INITIALIZED: { - const QString initialFile = m_data.selectedFile(); + if (!m_title.isEmpty()) + SetWindowText(hwnd, (wchar_t *)m_title.utf16()); + const QString initialFile = QDir::toNativeSeparators(m_data.directory()); if (!initialFile.isEmpty()) SendMessage(hwnd, BFFM_SETSELECTION, TRUE, LPARAM(initialFile.utf16())); } @@ -1743,8 +1745,7 @@ QStringList QWindowsXpNativeFileDialog::execExistingDir(HWND owner) initPath[0] = 0; bi.hwndOwner = owner; bi.pidlRoot = NULL; - //### This does not seem to be respected? - the dialog always displays "Browse for folder" - bi.lpszTitle = (wchar_t*)m_title.utf16(); + bi.lpszTitle = 0; bi.pszDisplayName = initPath; bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_NEWDIALOGSTYLE; bi.lpfn = xpFileDialogGetExistingDirCallbackProc; -- cgit v1.2.3 From b24a115706d89351d4b0ebb075e869349490b301 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 25 Jun 2013 15:20:14 +0200 Subject: Mac/XCB/Windows: Fix initial setting of window icons. Setting an icon on a QWindow before creating the platform window did not have any effect. Task-number: QTBUG-31961 Change-Id: I8e58a3b239c8bc69af58f765e7826337463d2201 Reviewed-by: Shawn Rutledge Reviewed-by: Joerg Bornemann --- src/plugins/platforms/cocoa/qcocoawindow.mm | 2 ++ src/plugins/platforms/windows/qwindowswindow.cpp | 2 ++ src/plugins/platforms/xcb/qxcbwindow.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 19c4faf369..057eb7e144 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -235,6 +235,8 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw) setGeometry(tlw->geometry()); recreateWindow(parent()); tlw->setGeometry(geometry()); + if (tlw->isTopLevel()) + setWindowIcon(tlw->icon()); m_inConstructor = false; } diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 9d817c2043..08ff7123eb 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -837,6 +837,8 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) : const qreal opacity = qt_window_private(aWindow)->opacity; if (!qFuzzyCompare(opacity, qreal(1.0))) setOpacity(opacity); + if (aWindow->isTopLevel()) + setWindowIcon(aWindow->icon()); clearFlag(WithinCreate); } diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 6291396e6e..065989735c 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -458,6 +458,8 @@ void QXcbWindow::create() const qreal opacity = qt_window_private(window())->opacity; if (!qFuzzyCompare(opacity, qreal(1.0))) setOpacity(opacity); + if (window()->isTopLevel()) + setWindowIcon(window()->icon()); } QXcbWindow::~QXcbWindow() -- cgit v1.2.3 From f30a905ea46edbb6303476aa1119686c490f6428 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 25 Jun 2013 16:05:31 +0200 Subject: configure: Don't use 'local' in report_support() The 'local' keyword doesn't exist in Solaris' bourne shell as a reserved word. Change-Id: I3270c74f79842ee10481a40a9f82d9fb74aff2e5 Reviewed-by: Thiago Macieira --- configure | 2 -- 1 file changed, 2 deletions(-) diff --git a/configure b/configure index 58c1eb2ce5..7cdb4af8a6 100755 --- a/configure +++ b/configure @@ -6703,11 +6703,9 @@ report_support() return :; esac - local heading heading=$1 shift - local value value=$1 shift -- cgit v1.2.3 From 4fdf33a800874c89f44b3642a439adb5463e7921 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 25 Jun 2013 16:19:40 +0200 Subject: configure: Use $AWK instead of plain 'awk' The $AWK variable already contains the best awk version available. Possible values for this variable are: gawk, nawk or awk. Using just awk fails on Solaris with: user@localhost:~/qtbase$ ./configure -platform solaris-g++ awk: syntax error near line 4 awk: bailing out near line 4 This is the Qt Open Source Edition. Change-Id: I02a17915e8b27a5ce7e831a1225872cf460b3a6b Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 7cdb4af8a6..dacf3826b3 100755 --- a/configure +++ b/configure @@ -3036,7 +3036,7 @@ gccout=`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E - libdirs=`echo "$gccout" | sed -n -e 's/^LIBRARY_PATH=\(.*\)/\1/p'` DEFAULT_LIBDIRS=`IFS=${HOST_DIRLIST_SEP}; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done` # extract from indented lines between '#include <...> search starts here:' and 'End of search list.' -DEFAULT_INCDIRS=`echo "$gccout" | awk ' +DEFAULT_INCDIRS=`echo "$gccout" | $AWK ' /^End of search/ { yup=0 } / \(framework directory\)$/ { next } yup { print substr($0, 2) } @@ -6086,7 +6086,7 @@ case "$XPLATFORM" in ;; solaris-cc*) # Check the compiler version - case `${QMAKE_CONF_COMPILER} -V 2>&1 | awk '{print $4}'` in + case `${QMAKE_CONF_COMPILER} -V 2>&1 | $AWK '{print $4}'` in 5.[012345678]) canBuildWebKit="no" canBuildQtXmlPatterns="no" -- cgit v1.2.3 From 64ce8039ac073d38494246a7185a2d6dba20372d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 14 Jun 2013 14:04:13 +0200 Subject: Accessibility: Fix crash in tst_qmdisubwindow. Change-Id: Ia8279e4cfa7bfe4617511c8a96961760174f7266 Reviewed-by: Frederik Gladhorn --- src/plugins/accessible/widgets/qaccessiblewidgets.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp index 59dc03666b..cbb3092b1d 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp @@ -430,8 +430,9 @@ QAccessible::State QAccessibleMdiSubWindow::state() const state.focused = true; if (!mdiSubWindow()->isVisible()) state.invisible = true; - if (!mdiSubWindow()->parentWidget()->contentsRect().contains(mdiSubWindow()->geometry())) - state.offscreen = true; + if (const QWidget *parent = mdiSubWindow()->parentWidget()) + if (!parent->contentsRect().contains(mdiSubWindow()->geometry())) + state.offscreen = true; if (!mdiSubWindow()->isEnabled()) state.disabled = true; return state; -- cgit v1.2.3