From e432c715dd6b17787eb8c1a24078c3ed751441a1 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 1 Feb 2016 13:33:20 +0100 Subject: [PATCH 1/7] TextEditor: Revert adaptation to reverted QTextCursor API change. Change-Id: I1f778f6389adc6937330b727006ad89880328cb5 Reviewed-by: David Schulz --- src/plugins/texteditor/texteditoroverlay.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp index 7837fd52b53..025b3206386 100644 --- a/src/plugins/texteditor/texteditoroverlay.cpp +++ b/src/plugins/texteditor/texteditoroverlay.cpp @@ -37,10 +37,6 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) -#include -#endif - using namespace TextEditor; using namespace TextEditor::Internal; @@ -96,13 +92,8 @@ void TextEditorOverlay::addOverlaySelection(int begin, int end, selection.m_fg = fg; selection.m_bg = bg; -#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) - selection.m_cursor_begin = QTextCursorPrivate::fromPosition(document->docHandle(), begin); - selection.m_cursor_end = QTextCursorPrivate::fromPosition(document->docHandle(), end); -#else selection.m_cursor_begin = QTextCursor(document->docHandle(), begin); selection.m_cursor_end = QTextCursor(document->docHandle(), end); -#endif if (overlaySelectionFlags & ExpandBegin) selection.m_cursor_begin.setKeepPositionOnInsert(true); From 0532c947587f246fda285253788e1fcbf5da1ef6 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 1 Feb 2016 15:28:38 +0100 Subject: [PATCH 2/7] Editor: Avoid using private text document handle. Task-number: QTCREATORBUG-15238 Change-Id: I6c7636ac4762c48c53767beaa97b0ce567f87dd1 Reviewed-by: hjk --- src/plugins/texteditor/texteditoroverlay.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp index 025b3206386..e7f41f0d129 100644 --- a/src/plugins/texteditor/texteditoroverlay.cpp +++ b/src/plugins/texteditor/texteditoroverlay.cpp @@ -92,8 +92,10 @@ void TextEditorOverlay::addOverlaySelection(int begin, int end, selection.m_fg = fg; selection.m_bg = bg; - selection.m_cursor_begin = QTextCursor(document->docHandle(), begin); - selection.m_cursor_end = QTextCursor(document->docHandle(), end); + selection.m_cursor_begin = QTextCursor(document); + selection.m_cursor_begin.setPos(begin); + selection.m_cursor_end = QTextCursor(document); + selection.m_cursor_end.setPos(end); if (overlaySelectionFlags & ExpandBegin) selection.m_cursor_begin.setKeepPositionOnInsert(true); From 182bd0b34e3c10f2adc5823e84ae5062c3fc9965 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 2 Feb 2016 09:47:03 +0100 Subject: [PATCH 3/7] Editor: Fix compiling of editor overlay. Introduced by 0532c947587f246fda285253788e1fcbf5da1ef6 . Change-Id: Ia10c09a44012649ffab4fa35d0f1ac20d2233474 Reviewed-by: hjk --- src/plugins/texteditor/texteditoroverlay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp index e7f41f0d129..43696712fe6 100644 --- a/src/plugins/texteditor/texteditoroverlay.cpp +++ b/src/plugins/texteditor/texteditoroverlay.cpp @@ -93,9 +93,9 @@ void TextEditorOverlay::addOverlaySelection(int begin, int end, selection.m_bg = bg; selection.m_cursor_begin = QTextCursor(document); - selection.m_cursor_begin.setPos(begin); + selection.m_cursor_begin.setPosition(begin); selection.m_cursor_end = QTextCursor(document); - selection.m_cursor_end.setPos(end); + selection.m_cursor_end.setPosition(end); if (overlaySelectionFlags & ExpandBegin) selection.m_cursor_begin.setKeepPositionOnInsert(true); From f3ff4ba316bb47b90f1b49a916cee9407283d31b Mon Sep 17 00:00:00 2001 From: Nikita Baryshnikov Date: Sun, 31 Jan 2016 22:44:36 +0300 Subject: [PATCH 4/7] Clang: fix compile error avoid adding -L/usr/lib to linker options. To avoid linker errors with Qt from system and from own toolchain. Change-Id: I291943e6b17c2bf17eb0700b0fc0cda435588ad5 Reviewed-by: Oswald Buddenhagen Reviewed-by: Eike Ziller Reviewed-by: Nikolai Kosjar --- src/shared/clang/clang_installation.pri | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/clang/clang_installation.pri b/src/shared/clang/clang_installation.pri index 6e0ced06e84..805d5d414bb 100644 --- a/src/shared/clang/clang_installation.pri +++ b/src/shared/clang/clang_installation.pri @@ -93,7 +93,8 @@ unix { clang_lib = $$findClangLibInLibDir($$LLVM_LIBDIR) isEmpty(clang_lib): error("Cannot find Clang shared library in $$LLVM_LIBDIR") - LLVM_LIBS = -L$${LLVM_LIBDIR} -l$${clang_lib} + !contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): LLVM_LIBS = -L$${LLVM_LIBDIR} + LLVM_LIBS += -l$${clang_lib} } isEmpty(LLVM_VERSION): error("Cannot determine clang version at $$LLVM_INSTALL_DIR") From bba4c33fe66edbbcb9e4094956fe68560b535b22 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 1 Feb 2016 10:15:32 +0100 Subject: [PATCH 5/7] README.md: Add some Windows/Clang instructions. Change-Id: I3c854d7a932951d8340507c4799591bbccb179ef Reviewed-by: Nikolai Kosjar --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0ecd62598f3..fb74701d199 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,11 @@ For detailed information on the supported compilers, see command...` error. If a `sh.exe` is found, the compile process will fail. You have to remove it from the path. - 10. You are now ready to configure and build Qt and Qt Creator. + 10. To enable the Clang-based code model: Install Clang (>= version 3.6.2) + and set the environment variable LLVM_INSTALL_DIR to point to the + installation location. + + 11. You are now ready to configure and build Qt and Qt Creator. Please see for recommended configure-options for Qt 5. To use MinGW, open the the shell prompt and enter: @@ -133,10 +137,17 @@ For detailed information on the supported compilers, see cd ..\creator qmake && jom - 11. To launch Qt Creator, enter: + 12. To launch Qt Creator, enter: qtcreator - 12. When using Visual C++ with the "Debugging Tools for Windows" installed, + 13. To test the Clang-based code model, verify that backend process + bin\clangbackend.exe + launches (displaying its usage). + + The library libclang.dll needs to be copied to the bin directory if + Clang cannot be found in the path. + + 14. When using Visual C++ with the "Debugging Tools for Windows" installed, the extension library `qtcreatorcdbext.dll` to be loaded into the Windows console debugger (`cdb.exe`) should have been built under `lib\qtcreatorcdbext32` or `lib\qtcreatorcdbext64`. @@ -151,7 +162,7 @@ For detailed information on the supported compilers, see debugging from the repository . - 13. Qt Creator can be registered as a post-mortem debugger. This + 15. Qt Creator can be registered as a post-mortem debugger. This can be done in the options page or by running the tool qtcdebugger with administrative privileges passing the command line options -register/unregister, respectively. Alternatively, From 8c13f2437e118d19bdb25e264c216f7a85a88175 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 1 Feb 2016 19:01:03 +0100 Subject: [PATCH 6/7] Squish: Increase timeout in tst_git_first_commit Change-Id: Id65b729cd200bb37ad132b4071a263ab61bb3ed8 Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_git_first_commit/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/suite_tools/tst_git_first_commit/test.py b/tests/system/suite_tools/tst_git_first_commit/test.py index 67f34da4b45..89ec445ce62 100644 --- a/tests/system/suite_tools/tst_git_first_commit/test.py +++ b/tests/system/suite_tools/tst_git_first_commit/test.py @@ -64,7 +64,7 @@ def main(): clickButton(waitForObject(":Select a Git Commit.Show_QPushButton")) changedEdit = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidget") waitFor("len(str(changedEdit.plainText)) > 0 and " - "str(changedEdit.plainText) != 'Waiting for data...'", 20000) + "str(changedEdit.plainText) != 'Waiting for data...'", 40000) diffPlainText = str(changedEdit.plainText) test.verify("# This file is used to ignore files which are generated" in diffPlainText, "Comment from .gitignore in diff?") From 40dfb0dcf3d1dd16264d1326282e7f9c7cedde64 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 2 Feb 2016 12:05:56 +0100 Subject: [PATCH 7/7] sqlite: Fix qbs build. Qt 5.6 no longer pulls in the pthread library. Change-Id: I2059990ba55389e6f5cfe471e15bfc56920a7a5f Reviewed-by: Christian Stenger --- src/libs/sqlite/sqlite.qbs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/sqlite/sqlite.qbs b/src/libs/sqlite/sqlite.qbs index 2aa3e5f4c9a..e974e38cd6d 100644 --- a/src/libs/sqlite/sqlite.qbs +++ b/src/libs/sqlite/sqlite.qbs @@ -13,7 +13,8 @@ QtcLibrary { "SQLITE_ENABLE_COLUMN_METADATA" ]) cpp.optimization: "fast" - cpp.dynamicLibraries: base.concat((qbs.targetOS.contains("unix") && !qbs.targetOS.contains("openbsd")) ? ["dl"] : []) + cpp.dynamicLibraries: base.concat((qbs.targetOS.contains("unix") && !qbs.targetOS.contains("openbsd")) + ? ["dl", "pthread"] : []) Group {