diff --git a/doc/config/qtcreator-project.qdocconf b/doc/config/qtcreator-project.qdocconf index 7b1976f0c64..e13fb032e32 100644 --- a/doc/config/qtcreator-project.qdocconf +++ b/doc/config/qtcreator-project.qdocconf @@ -29,7 +29,6 @@ indexes += $QDOC_INDEX_DIR/qtwidgets/qtwidgets.index \ $QDOC_INDEX_DIR/qtsensors/qtsensors.index \ $QDOC_INDEX_DIR/qttestlib/qttestlib.index \ $QDOC_INDEX_DIR/qtuitools/qtuitools.index \ - $QDOC_INDEX_DIR/qtwebkit/qtwebkit.index \ $QDOC_INDEX_DIR/qtxml/qtxml.index include(macros.qdocconf) diff --git a/doc/images/qtcreator-linux-device-configurations.png b/doc/images/qtcreator-linux-device-configurations.png index 139123b67f5..fc8398ef8c7 100644 Binary files a/doc/images/qtcreator-linux-device-configurations.png and b/doc/images/qtcreator-linux-device-configurations.png differ diff --git a/doc/images/qtcreator-qnx-deployment.png b/doc/images/qtcreator-qnx-deployment.png index 4e91687f342..459540ef66e 100644 Binary files a/doc/images/qtcreator-qnx-deployment.png and b/doc/images/qtcreator-qnx-deployment.png differ diff --git a/doc/images/qtcreator-run-settings-linux-devices.png b/doc/images/qtcreator-run-settings-linux-devices.png deleted file mode 100644 index 47be61e81a3..00000000000 Binary files a/doc/images/qtcreator-run-settings-linux-devices.png and /dev/null differ diff --git a/doc/src/android/deploying-android.qdoc b/doc/src/android/deploying-android.qdoc index 35e3beda58c..2210ce950d9 100644 --- a/doc/src/android/deploying-android.qdoc +++ b/doc/src/android/deploying-android.qdoc @@ -121,8 +121,8 @@ \endlist - The Gradle wrappers and scripts are bundled only if you use Gradle, which is - the default. To use Ant instead, deselect the \uicontrol {Use Gradle} check box. + The Gradle wrappers and scripts are bundled only if you use + \l{Selecting the APK Build Tool}{Gradle} to build the application packages. To view the packages that the \c androiddeployqt tool created, select the \uicontrol {Open package location after build} check box. diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc index c7598a3cf1c..9fb1fb74e99 100644 --- a/doc/src/debugger/creator-debugger.qdoc +++ b/doc/src/debugger/creator-debugger.qdoc @@ -111,8 +111,7 @@ parameters. \note Starting a C++ program in the debugger can take a long time, typically - in the range of several seconds to minutes if complex features (like - QtWebKit) are used. + in the range of several seconds to minutes if complex features are used. \section1 Launching the Debugger in Different Modes @@ -217,7 +216,7 @@ The \QC installation program asks you whether you want to register \QC as a post-mortem debugger. To change the setting, select \uicontrol Tools > \uicontrol Options > \uicontrol Debugger > - \uicontrol General > \uicontrol {Use QtCreator for post-mortem debugging}. + \uicontrol General > \uicontrol {Use Qt Creator for post-mortem debugging}. You can launch the debugger in the post-mortem mode if an application crashes on Windows. Click the \uicontrol {Debug in \QC} button in the error diff --git a/doc/src/editors/creator-clang-codemodel.qdoc b/doc/src/editors/creator-clang-codemodel.qdoc index 5effcc64583..fedc2998041 100644 --- a/doc/src/editors/creator-clang-codemodel.qdoc +++ b/doc/src/editors/creator-clang-codemodel.qdoc @@ -96,35 +96,30 @@ \list 1 - \li To build the Clang code model plugin, you must acquire Clang and - LLVM in one of the following ways: + \li Acquire Clang 3.6.0 or higher in one of the following ways: \list - \li Build optimized versions of LLVM and Clang, as instructed in - \l{http://clang.llvm.org/get_started.html} - {Getting Started: Building and Running Clang}. - - The instructions describe how to build debug versions. To - build optimized versions, enter the following command - instead of just \c make: - - \c{make ENABLE_OPTIMIZED=1} - - For information about Git mirrors, see - \l{http://llvm.org/docs/GettingStarted.html#git-mirror} - {Git Mirror}. - - Install the built versions by entering the following - command: - - \c{make install} + \li Use the package manager of your system. \li Download and install LLVM from the \l{http://llvm.org/releases/}{LLVM Download Page} or \l{http://llvm.org/builds/}{LLVM Snapshot Builds}. - \li Use the package manager of your system. + \li Build Clang by following + \l{http://clang.llvm.org/get_started.html} + {Getting Started: Building and Running Clang}. + + Add the following options to the \c cmake call in order to + build an optimized version and to specify the installation + directory: + + \c -DCMAKE_BUILD_TYPE=Release + \c -DCMAKE_INSTALL_PREFIX=/your/install/dir + + After building, install with + + \c {make install} \endlist @@ -132,26 +127,7 @@ of LLVM either as part of the build environment or pass it directly to qmake when you build \QC. - The following are examples of the LLVM_INSTALL_DIR values to use - depending on the installation method: - - \list - - \li Installed via package manager on Linux: - - \c {LLVM_INSTALL_DIR=/usr/lib/llvm-3.6} - - \li Manually built on Unix in release mode: - - \c {LLVM_INSTALL_DIR=$HOME/llvm-build/Release+Asserts} - - \li Installed from a snapshot on Windows: - - \c {LLVM_INSTALL_DIR=C:\llvm} - - \endlist - - \li Rebuild \QC. + \li Rerun \c qmake and build \QC. \endlist diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc index 1ee685c844d..5c8fcb6a533 100644 --- a/doc/src/editors/creator-editors.qdoc +++ b/doc/src/editors/creator-editors.qdoc @@ -177,14 +177,13 @@ \QC validates instances of JSON entities against \l{http://tools.ietf.org/html/draft-zyp-json-schema-03} {A JSON Media Type for Describing the Structure and Meaning of JSON Documents}. - However, this feature is still under development, and \QC does not yet - understand the entire specification. + However, \QC does not understand the entire specification. A JSON schema defines the structure of JSON data. It determines what JSON data is required for an application and how to interact with it. The specification does not define how to map JSON instances with JSON - schemas. As a temporary solution, \QC looks for a JSON schema file with a + schemas. \QC looks for a JSON schema file with a name that matches the name of the JSON instance file in the user configuration folder. For example, \c {~/config/QtProject/qtcreator/json} on Linux and OS X and @@ -203,8 +202,7 @@ \section1 List of JavaScript and QML Checks Many of the JavaScript checks are similar to the ones in Douglas Crockford's - JSLint tool and are explained well on - \l{http://www.jslint.com/lint.html}{the JSLint website}. + \l{http://www.jslint.com}{JSLint} tool. \table \header @@ -1053,13 +1051,14 @@ For example, you might ask colleagues to review a change that you plan to submit to a version control system. If you use the Git version control system, you can create a \e{diff} view by selecting \uicontrol Tools > - \uicontrol Git > \uicontrol {Diff Repository}. You can then upload its - contents to the server by choosing \uicontrol Tools > + \uicontrol Git > \uicontrol {Local Repository} > \uicontrol Diff. You can + then upload its contents to the server by selecting \uicontrol Tools > \uicontrol {Code Pasting} > \uicontrol {Paste Snippet}. The reviewers can retrieve the code snippet by selecting \uicontrol Tools > \uicontrol {Code Pasting} > \uicontrol {Fetch Snippet}. If they have the project currently opened in \QC, they can apply and test the change by - choosing \uicontrol Tools > \uicontrol Git > \uicontrol {Apply Patch}. + choosing \uicontrol Tools > \uicontrol Git > \uicontrol {Patch} > + \uicontrol {Apply from Editor}. */ diff --git a/doc/src/linux-mobile/linuxdev.qdoc b/doc/src/linux-mobile/linuxdev.qdoc index be23dc6aa54..b4ded6b3d10 100644 --- a/doc/src/linux-mobile/linuxdev.qdoc +++ b/doc/src/linux-mobile/linuxdev.qdoc @@ -117,11 +117,8 @@ \endlist - \li Select \uicontrol Run to specify run settings. - - \image qtcreator-run-settings-linux-devices.png "Run settings for embedded Linux devices" - - Usually, you can use the default settings. + \li Select \uicontrol Run to specify run settings. Usually, you can use + the default settings. When you run the project, \QC deploys the application as specified by the deploy steps. By default, \QC copies the application files to the device. diff --git a/share/qtcreator/templates/wizards/README.txt b/share/qtcreator/templates/wizards/README.txt index 3a2e9486224..1b1c1c63a73 100644 --- a/share/qtcreator/templates/wizards/README.txt +++ b/share/qtcreator/templates/wizards/README.txt @@ -1,9 +1,4 @@ Qt Creator custom wizards are located in this directory. -The subdirectories 'helloworld', 'listmodel' and 'scriptgeneratedproject' -are provided as examples. -To see how they work in Qt Creator, rename the 'wizard_sample.xml' files -to 'wizard.xml'. - The command line option -customwizard-verbose can be used to obtain verbose information while loading the custom wizards. diff --git a/src/libs/aggregation/aggregate.h b/src/libs/aggregation/aggregate.h index 1b4eee9003d..8a818b431b6 100644 --- a/src/libs/aggregation/aggregate.h +++ b/src/libs/aggregation/aggregate.h @@ -53,7 +53,7 @@ public: void remove(QObject *component); template T *component() { - QReadLocker(&lock()); + QReadLocker locker(&lock()); foreach (QObject *component, m_components) { if (T *result = qobject_cast(component)) return result; @@ -62,7 +62,7 @@ public: } template QList components() { - QReadLocker(&lock()); + QReadLocker locker(&lock()); QList results; foreach (QObject *component, m_components) { if (T *result = qobject_cast(component)) { @@ -101,7 +101,7 @@ template T *query(QObject *obj) return (T *)0; T *result = qobject_cast(obj); if (!result) { - QReadLocker(&lock()); + QReadLocker locker(&Aggregate::lock()); Aggregate *parentAggregation = Aggregate::parentAggregate(obj); result = (parentAggregation ? query(parentAggregation) : 0); } @@ -120,7 +120,7 @@ template QList query_all(QObject *obj) { if (!obj) return QList(); - QReadLocker(&lock()); + QReadLocker locker(&Aggregate::lock()); Aggregate *parentAggregation = Aggregate::parentAggregate(obj); QList results; if (parentAggregation) diff --git a/src/plugins/clangcodemodel/clangbackendipcintegration.cpp b/src/plugins/clangcodemodel/clangbackendipcintegration.cpp index 3d44710072c..853d09c0a30 100644 --- a/src/plugins/clangcodemodel/clangbackendipcintegration.cpp +++ b/src/plugins/clangcodemodel/clangbackendipcintegration.cpp @@ -245,7 +245,7 @@ void IpcCommunicator::initializeBackend() qCDebug(log) << "Starting" << clangBackEndProcessPath; QTC_ASSERT(QFileInfo(clangBackEndProcessPath).exists(), return); - m_connection.setProcessAliveTimerInterval(10 * 1000); + m_connection.setProcessAliveTimerInterval(30 * 1000); m_connection.setProcessPath(clangBackEndProcessPath); connect(&m_connection, &ConnectionClient::processRestarted, diff --git a/src/plugins/clangcodemodel/semanticmarker.cpp b/src/plugins/clangcodemodel/semanticmarker.cpp index cb17346d109..274e28e5ca6 100644 --- a/src/plugins/clangcodemodel/semanticmarker.cpp +++ b/src/plugins/clangcodemodel/semanticmarker.cpp @@ -134,10 +134,12 @@ static void appendDiagnostic(const CXDiagnostic &diag, static bool isBlackListedDiagnostic(const Utils::MimeType &mimeType, const QString &diagnostic) { - static QString pragmaOnceInMainFile = QLatin1String("#pragma once in main file"); + static const QStringList blackList { + QLatin1String("#pragma once in main file"), + QLatin1String("#include_next in primary source file") + }; - return diagnostic == pragmaOnceInMainFile - && mimeType.inherits(QLatin1String("text/x-chdr")); + return mimeType.inherits(QLatin1String("text/x-chdr")) && blackList.contains(diagnostic); } QList SemanticMarker::diagnostics() const diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index 4c552d8eda7..1544c406afd 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -107,18 +107,6 @@ public: | TextEditorActionHandler::FollowSymbolUnderCursor); addHoverHandler(new CppHoverHandler); - - if (!HostOsInfo::isMacHost() && !HostOsInfo::isWindowsHost()) { - FileIconProvider::registerIconOverlayForMimeType( - QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppSource, QLatin1String(":/cppeditor/images/qt_cpp.png"))), - Constants::CPP_SOURCE_MIMETYPE); - FileIconProvider::registerIconOverlayForMimeType( - QIcon(creatorTheme()->imageFile(Theme::IconOverlayCSource, QLatin1String(":/cppeditor/images/qt_c.png"))), - Constants::C_SOURCE_MIMETYPE); - FileIconProvider::registerIconOverlayForMimeType( - QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppHeader, QLatin1String(":/cppeditor/images/qt_h.png"))), - Constants::CPP_HEADER_MIMETYPE); - } } }; @@ -280,6 +268,17 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err void CppEditorPlugin::extensionsInitialized() { + if (!HostOsInfo::isMacHost() && !HostOsInfo::isWindowsHost()) { + FileIconProvider::registerIconOverlayForMimeType( + QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppSource, QLatin1String(":/cppeditor/images/qt_cpp.png"))), + Constants::CPP_SOURCE_MIMETYPE); + FileIconProvider::registerIconOverlayForMimeType( + QIcon(creatorTheme()->imageFile(Theme::IconOverlayCSource, QLatin1String(":/cppeditor/images/qt_c.png"))), + Constants::C_SOURCE_MIMETYPE); + FileIconProvider::registerIconOverlayForMimeType( + QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppHeader, QLatin1String(":/cppeditor/images/qt_h.png"))), + Constants::CPP_HEADER_MIMETYPE); + } } ExtensionSystem::IPlugin::ShutdownFlag CppEditorPlugin::aboutToShutdown() diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 354d98302ce..8997a388b55 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -186,7 +186,7 @@ QStringList BaseController::addConfigurationArguments(const QStringList &args) c QStringList realArgs; realArgs << args.at(0); - realArgs << QLatin1String("-m"); // show diff agains parents instead of merge commits + realArgs << QLatin1String("-m"); // show diff against parents instead of merge commits realArgs << QLatin1String("-M") << QLatin1String("-C"); // Detect renames and copies realArgs << QLatin1String("--first-parent"); // show only first parent if (ignoreWhitespace()) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 514130aabcc..649206ff330 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -2532,7 +2532,7 @@ void TextEditorWidget::doSetTextCursor(const QTextCursor &cursor) void TextEditorWidget::gotoLine(int line, int column, bool centerLine) { d->m_lastCursorChangeWasInteresting = false; // avoid adding the previous position to history - const int blockNumber = line - 1; + const int blockNumber = qMin(line, document()->blockCount()) - 1; const QTextBlock &block = document()->findBlockByNumber(blockNumber); if (block.isValid()) { QTextCursor cursor(block); diff --git a/src/shared/qbs b/src/shared/qbs index 2867e2712e4..bca958c3f55 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 2867e2712e4c03308e4be76821d788c06bac565e +Subproject commit bca958c3f55ca73b7cc9cf09317b192a2dec1bc5 diff --git a/src/tools/iostool/main.cpp b/src/tools/iostool/main.cpp index 8aad4e961ad..f902f761cd5 100644 --- a/src/tools/iostool/main.cpp +++ b/src/tools/iostool/main.cpp @@ -896,6 +896,8 @@ void IosTool::stopRelayServers(int errorCode) int main(int argc, char *argv[]) { + //This keeps iostool from stealing focus + qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true"); // We do not pass the real arguments to QCoreApplication because this wrapper needs to be able // to forward arguments like -qmljsdebugger=... that are filtered by QCoreApplication QStringList args; diff --git a/tests/system/suite_CSUP/tst_CSUP02/test.py b/tests/system/suite_CSUP/tst_CSUP02/test.py index b856f167aff..ca93b9f7214 100644 --- a/tests/system/suite_CSUP/tst_CSUP02/test.py +++ b/tests/system/suite_CSUP/tst_CSUP02/test.py @@ -61,25 +61,25 @@ def main(): type(editorWidget, "") else: type(editorWidget, "") - type(waitForObject(":popupFrame_Proposal_QListView"), "") - if current == "Clang": - # different order with Clang code model - type(waitForObject(":popupFrame_Proposal_QListView"), "") listView = waitForObject(":popupFrame_Proposal_QListView") - test.compare("class derived from QObject", str(listView.model().data(listView.currentIndex())), - "Verifying selecting the correct entry.") - type(waitForObject(":popupFrame_Proposal_QListView"), "") - test.verify(str(editorWidget.plainText).startswith("class name : public QObject"), - "Steps 3&4: Verifying if: The list of suggestions is opened. It is " - "possible to select one of the suggestions. Code with several " - "variables is inserted.") + shownProposals = dumpItems(listView.model()) + usedProposal = "class derived from QObject" + expectedProposals = ["class", "class ", "class template", + usedProposal, "class derived from QWidget"] + test.compare(len(shownProposals), len(expectedProposals), "Number of proposed templates") + test.compare(set(shownProposals), set(expectedProposals), + "Expected proposals shown, ignoring order?") + doubleClickItem(listView, usedProposal, 5, 5, 0, Qt.LeftButton) + pattern = ("(?<=class)\s+name\s*:\s*public\s+QObject\s*\{\s*Q_OBJECT\s+" + "public:\s+name\(\)\s*\{\}\s+virtual\s+~name\(\)\s*\{\}\s+\};") + test.verify(re.search(pattern, str(editorWidget.plainText)), + "Code with several variables is inserted?") # Step 5: Press Tab to move between the variables and specify values for them. For example write "Myname" for variable "name". type(editorWidget, "") type(editorWidget, "") type(editorWidget, "") type(editorWidget, "Myname") - pattern = "(?<=class)\s+Myname\s*:\s*public\s+QObject\s*\{\s*Q_OBJECT\s+public:\s+Myname\(\)\s*\{\}\s+virtual\s+~Myname\(\)\s*\{\}\s+\};" - result = re.search(pattern, str(editorWidget.plainText)) + result = re.search(pattern.replace("name", "Myname"), str(editorWidget.plainText)) if result: test.passes("Step 5: Verifying if: A value for a variable is inserted and all " "instances of the variable within the snippet are renamed.") diff --git a/tests/system/suite_editors/shared/testdata/binary.bin b/tests/system/suite_editors/shared/testdata/binary.bin new file mode 100644 index 00000000000..233ed4c307c Binary files /dev/null and b/tests/system/suite_editors/shared/testdata/binary.bin differ