From e241444ba3c8a6d3e6bcf2b8188a290f13bb3881 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 28 Sep 2015 08:42:14 +0200 Subject: [PATCH 1/4] C++: Comment out a flaky test The test relied on logic that was reverted with change 915f68deac95bf17bd97d1a2644264afb0b86f0b. LookupScopePrivate::findSpecialization() gets a "TemplateNameIdTable &specializations" with a non-deterministic order. Without the extra logic, the very first entry will be chosen as the found specialization. The non-deterministic order comes from the TemplateNameId::Compare, which calls std::lexicographical_compare() with the template arguments, which are FullySpecifiedTypes. The result of FullySpecifiedType::operator<() might depend on a pointer comparison. Change-Id: I8d69d1bb5831145b1c21a5ea848c0043f17ec415 Reviewed-by: Christian Stenger --- src/plugins/cpptools/cppcompletion_test.cpp | 31 ++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index 7a6dce2a3a6..d57742ca317 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -333,7 +333,6 @@ void CppToolsPlugin::test_completion() QEXPECT_FAIL("template_specialization_with_reference", "test of reverted change", Abort); QEXPECT_FAIL("specialization_multiple_arguments", "test of reverted change", Abort); QEXPECT_FAIL("specialization_with_default_value", "test of reverted change", Abort); - QEXPECT_FAIL("partial_specialization_with_pointer", "test of reverted change", Abort); QEXPECT_FAIL("enum_in_function_in_struct_in_function", "QTCREATORBUG-13757", Abort); QEXPECT_FAIL("enum_in_function_in_struct_in_function_cxx11", "QTCREATORBUG-13757", Abort); QEXPECT_FAIL("enum_in_function_in_struct_in_function_anon", "QTCREATORBUG-13757", Abort); @@ -2704,21 +2703,21 @@ void CppToolsPlugin::test_completion_data() << QLatin1String("i") << QLatin1String("s")); - QTest::newRow("partial_specialization_with_pointer") << _( - "struct b {};\n" - "struct a : b {};\n" - "template struct s { float f; };\n" - "template struct s { int i; };\n" - "template struct s { char j; };\n" - "\n" - "void f()\n" - "{\n" - " s var;\n" - " @\n" - "}\n" - ) << _("var.") << (QStringList() - << QLatin1String("j") - << QLatin1String("s")); +// QTest::newRow("partial_specialization_with_pointer") << _( +// "struct b {};\n" +// "struct a : b {};\n" +// "template struct s { float f; };\n" +// "template struct s { int i; };\n" +// "template struct s { char j; };\n" +// "\n" +// "void f()\n" +// "{\n" +// " s var;\n" +// " @\n" +// "}\n" +// ) << _("var.") << (QStringList() +// << QLatin1String("j") +// << QLatin1String("s")); QTest::newRow("partial_specialization_templated_argument") << _( "template struct t {};\n" From b2dae0276243de7ff59de3a7cd4bb19701f0e549 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 27 Sep 2015 17:03:56 +0300 Subject: [PATCH 2/4] Git: Enable "Continue Merging" dialog on deleted conflict When a Deleted conflict is aborted, this prompt appears too. Change-Id: I8f45363c4875b2d66bcbff93cf53b075d890ba2b Reviewed-by: Tobias Hunger Reviewed-by: Eike Ziller --- src/plugins/git/mergetool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/git/mergetool.cpp b/src/plugins/git/mergetool.cpp index c273ef629ae..cc58e6ff07a 100644 --- a/src/plugins/git/mergetool.cpp +++ b/src/plugins/git/mergetool.cpp @@ -250,7 +250,7 @@ void MergeTool::readData() m_localState = waitAndReadStatus(m_localInfo); m_remoteState = waitAndReadStatus(m_remoteInfo); chooseAction(); - } else if (m_merging && line.startsWith("Continue merging")) { + } else if (line.startsWith("Continue merging")) { if (QMessageBox::question(Core::ICore::dialogParent(), tr("Continue Merging"), tr("Continue merging other unresolved paths?"), QMessageBox::Yes | QMessageBox::No, From b42bd585c4d3a6c86efb5bc5ee0ec9f00a239dcf Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 28 Sep 2015 20:53:04 -0700 Subject: [PATCH 3/4] Revert "Set environment variable QT_AUTO_SCREEN_SCALE_FACTOR in Qt 5.6." This reverts commit 85e1b4d0896465b825f561330a66e5bfd3928087. Setting that environment variable breaks the UI completely for certain environments. If Qt itself doesn't enable auto scaling by default, neither should Creator (for good reason, as it apparently doesn't work yet on X11). Worse, Qt Creator must respect the environment settings set by the user, never override it. This commit was unconditionally setting the auto scaling, making it impossible for me to override the settings. Task-number: QTCREATORBUG-15115 Change-Id: I42e7ef1a481840699a8dffff140857f6c0b33713 Reviewed-by: Friedemann Kleint Reviewed-by: Eike Ziller --- src/app/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index f8ce9a87f44..bb10f99790a 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -299,8 +299,6 @@ int main(int argc, char **argv) && !qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")) { qputenv("QT_DEVICE_PIXEL_RATIO", "auto"); } -#else - qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); #endif // < Qt 5.6 QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false")); From 6dca1499ac867a3a66d5d1210918ec1f8ff0652c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 3 Jul 2015 16:05:06 +0200 Subject: [PATCH 4/4] Allow different destination directory than Qt Creator build directory This is useful for compiling and packaging plugins separately from Qt Creator, where we want to keep the structure of the compilation result the same as, but separately from, the Qt Creator build directory. Change-Id: I307f119fc7901e00790ec85bfb01cc3ba5fa6e85 Reviewed-by: Oswald Buddenhagen Reviewed-by: Tobias Hunger --- qtcreator.pri | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/qtcreator.pri b/qtcreator.pri index 0d3f68feb87..2f0ae9ed3d8 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -73,26 +73,43 @@ isEmpty(IDE_BUILD_TREE) { IDE_BUILD_TREE = $$clean_path($$OUT_PWD) IDE_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,, } + IDE_APP_PATH = $$IDE_BUILD_TREE/bin -macx { +osx { IDE_APP_TARGET = "Qt Creator" - IDE_LIBRARY_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Frameworks - IDE_PLUGIN_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/PlugIns - IDE_LIBEXEC_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources - IDE_DATA_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/Resources + + IDE_APP_BUNDLE = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app + + # set output path if not set manually + isEmpty(IDE_OUTPUT_PATH): IDE_OUTPUT_PATH = $$IDE_APP_BUNDLE/Contents + + IDE_LIBRARY_PATH = $$IDE_OUTPUT_PATH/Frameworks + IDE_PLUGIN_PATH = $$IDE_OUTPUT_PATH/PlugIns + IDE_LIBEXEC_PATH = $$IDE_OUTPUT_PATH/Resources + IDE_DATA_PATH = $$IDE_OUTPUT_PATH/Resources IDE_DOC_PATH = $$IDE_DATA_PATH/doc - IDE_BIN_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS + IDE_BIN_PATH = $$IDE_OUTPUT_PATH/MacOS copydata = 1 + + LINK_LIBRARY_PATH = $$IDE_APP_BUNDLE/Contents/Frameworks + LINK_PLUGIN_PATH = $$IDE_APP_BUNDLE/Contents/PlugIns } else { contains(TEMPLATE, vc.*):vcproj = 1 IDE_APP_TARGET = qtcreator - IDE_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator + + # target output path if not set manually + isEmpty(IDE_OUTPUT_PATH): IDE_OUTPUT_PATH = $$IDE_BUILD_TREE + + IDE_LIBRARY_PATH = $$IDE_OUTPUT_PATH/$$IDE_LIBRARY_BASENAME/qtcreator IDE_PLUGIN_PATH = $$IDE_LIBRARY_PATH/plugins - IDE_LIBEXEC_PATH = $$IDE_APP_PATH # FIXME - IDE_DATA_PATH = $$IDE_BUILD_TREE/share/qtcreator - IDE_DOC_PATH = $$IDE_BUILD_TREE/share/doc/qtcreator - IDE_BIN_PATH = $$IDE_APP_PATH - !isEqual(IDE_SOURCE_TREE, $$IDE_BUILD_TREE):copydata = 1 + IDE_LIBEXEC_PATH = $$IDE_OUTPUT_PATH/bin # FIXME + IDE_DATA_PATH = $$IDE_OUTPUT_PATH/share/qtcreator + IDE_DOC_PATH = $$IDE_OUTPUT_PATH/share/doc/qtcreator + IDE_BIN_PATH = $$IDE_OUTPUT_PATH/bin + !isEqual(IDE_SOURCE_TREE, $$IDE_OUTPUT_PATH):copydata = 1 + + LINK_LIBRARY_PATH = $$IDE_BUILD_TREE/$$IDE_LIBRARY_BASENAME/qtcreator + LINK_PLUGIN_PATH = $$LINK_LIBRARY_PATH/plugins } INCLUDEPATH += \ @@ -111,7 +128,8 @@ CONFIG += \ depend_includepath \ no_include_pwd -LIBS += -L$$IDE_LIBRARY_PATH +LIBS *= -L$$LINK_LIBRARY_PATH # Qt Creator libraries +exists($$IDE_LIBRARY_PATH): LIBS *= -L$$IDE_LIBRARY_PATH # library path from output path !isEmpty(vcproj) { DEFINES += IDE_LIBRARY_BASENAME=\"$$IDE_LIBRARY_BASENAME\" @@ -149,7 +167,11 @@ qt { QBSFILE = $$replace(_PRO_FILE_, \\.pro$, .qbs) exists($$QBSFILE):DISTFILES += $$QBSFILE -!isEmpty(QTC_PLUGIN_DEPENDS):LIBS *= -L$$IDE_PLUGIN_PATH +!isEmpty(QTC_PLUGIN_DEPENDS) { + LIBS *= -L$$IDE_PLUGIN_PATH # plugin path from output directory + LIBS *= -L$$LINK_PLUGIN_PATH # when output path is different from Qt Creator build directory +} + # recursively resolve plugin deps done_plugins = for(ever) {