diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-07-29 16:12:02 +0300 |
---|---|---|
committer | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-07-29 16:13:18 +0300 |
commit | 35d7352b3e2965768f90dc3f2ac17aec68af5df5 (patch) | |
tree | e9ce2b482fe1a4ea965701154ba4967256202462 | |
parent | cda7a3188f86f6a506225a679e123ee72b8c4f76 (diff) | |
parent | 5c5197d19d31a7c81f5bfb64a666b589bbd5638c (diff) | |
download | qt-creator-35d7352b3e2965768f90dc3f2ac17aec68af5df5.tar.gz |
Merge remote-tracking branch 'origin/4.1'
Change-Id: Ie96fa53a88bcd06fa688a579c1d84aaf6f5e905f
289 files changed, 1531 insertions, 662 deletions
diff --git a/doc/config/qtcreator-project.qdocconf b/doc/config/qtcreator-project.qdocconf index 50986a4c4b..d31caa91b5 100644 --- a/doc/config/qtcreator-project.qdocconf +++ b/doc/config/qtcreator-project.qdocconf @@ -38,10 +38,12 @@ indexes += $QDOC_INDEX_DIR/qtwidgets/qtwidgets.index \ $QDOC_INDEX_DIR/qtgui/qtgui.index \ $QDOC_INDEX_DIR/qthelp/qthelp.index \ $QDOC_INDEX_DIR/qtquickcontrols/qtquickcontrols.index \ + $QDOC_INDEX_DIR/qtquickcontrols2/qtquickcontrols2.index \ $QDOC_INDEX_DIR/qtquickextras/qtquickextras.index \ $QDOC_INDEX_DIR/qtquicklayouts/qtquicklayouts.index \ $QDOC_INDEX_DIR/qtlinguist/qtlinguist.index \ $QDOC_INDEX_DIR/qtscript/qtscript.index \ + $QDOC_INDEX_DIR/qtscxml/qtscxml.index \ $QDOC_INDEX_DIR/qtsensors/qtsensors.index \ $QDOC_INDEX_DIR/qttestlib/qttestlib.index \ $QDOC_INDEX_DIR/qtuitools/qtuitools.index \ diff --git a/doc/images/qmldesigner-bindings.png b/doc/images/qmldesigner-bindings.png Binary files differindex 723fe3ea11..ebe24eb758 100644 --- a/doc/images/qmldesigner-bindings.png +++ b/doc/images/qmldesigner-bindings.png diff --git a/doc/images/qmldesigner-borderimage-bindings-text.png b/doc/images/qmldesigner-borderimage-bindings-text.png Binary files differindex 6484c13f01..9a1e47c52d 100644 --- a/doc/images/qmldesigner-borderimage-bindings-text.png +++ b/doc/images/qmldesigner-borderimage-bindings-text.png diff --git a/doc/images/qmldesigner-borderimage-bindings.png b/doc/images/qmldesigner-borderimage-bindings.png Binary files differindex 78a82b7f56..1955f74567 100644 --- a/doc/images/qmldesigner-borderimage-bindings.png +++ b/doc/images/qmldesigner-borderimage-bindings.png diff --git a/doc/images/qmldesigner-borderimage-connections.png b/doc/images/qmldesigner-borderimage-connections.png Binary files differindex e37adb6924..caaa7a7236 100644 --- a/doc/images/qmldesigner-borderimage-connections.png +++ b/doc/images/qmldesigner-borderimage-connections.png diff --git a/doc/images/qmldesigner-borderimage-properties.png b/doc/images/qmldesigner-borderimage-properties.png Binary files differindex 1a51b61a25..9f8628eba1 100644 --- a/doc/images/qmldesigner-borderimage-properties.png +++ b/doc/images/qmldesigner-borderimage-properties.png diff --git a/doc/images/qtcreator-vcs-gitbranch.png b/doc/images/qtcreator-vcs-gitbranch.png Binary files differindex beb0a9e8ba..26b3a3992a 100644 --- a/doc/images/qtcreator-vcs-gitbranch.png +++ b/doc/images/qtcreator-vcs-gitbranch.png diff --git a/doc/images/replace.png b/doc/images/replace.png Binary files differnew file mode 100644 index 0000000000..d963646da9 --- /dev/null +++ b/doc/images/replace.png diff --git a/doc/src/debugger/creator-debugger-setup.qdoc b/doc/src/debugger/creator-debugger-setup.qdoc index 6a7e66d1ba..cd567cba35 100644 --- a/doc/src/debugger/creator-debugger-setup.qdoc +++ b/doc/src/debugger/creator-debugger-setup.qdoc @@ -137,7 +137,7 @@ On OS X you can use the LLDB version delivered with Xcode or build from source. The minimum supported version is LLDB 320.4. - On Linux, the minimum supported version is LLDB 3.7. + On Linux, the minimum supported version is LLDB 3.8. \omit diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc index 7ac3dfaeaa..9d7e28f186 100644 --- a/doc/src/editors/creator-editors.qdoc +++ b/doc/src/editors/creator-editors.qdoc @@ -2537,6 +2537,11 @@ \key Space. The prefix is usually a single character. Then type the search string (typically, a filename or class name) or the command to execute. + You can also double-click a locator filter in the filter list to use it. You + can use the up and down arrow keys or the \key Ctrl+P and \key Ctrl+N + keyboard shortcuts to move up and down the list, and then press \key Enter + to use the selected filter. + For example, to locate symbols matching QDataStream: \list 1 diff --git a/doc/src/howto/creator-ui.qdoc b/doc/src/howto/creator-ui.qdoc index 30d8b1cd3e..6b1e038333 100644 --- a/doc/src/howto/creator-ui.qdoc +++ b/doc/src/howto/creator-ui.qdoc @@ -486,9 +486,9 @@ You can change the property values permanently in the code editor. - \section2 To-Do List + \section2 To-Do Entries - The \uicontrol {To-Do List Entries} pane lists the BUG, FIXME, NOTE, TODO, and + The \uicontrol {To-Do Entries} pane lists the BUG, FIXME, NOTE, TODO, and WARNING keywords from the current file or from all project files. The keywords are organized into information, warning, and error categories. diff --git a/doc/src/howto/creator-vcs.qdoc b/doc/src/howto/creator-vcs.qdoc index 30f26e26a1..0967170356 100644 --- a/doc/src/howto/creator-vcs.qdoc +++ b/doc/src/howto/creator-vcs.qdoc @@ -481,7 +481,8 @@ \section4 Working with Branches - To work with Git branches, select \uicontrol{Branches}. The checked out branch + To work with Git branches, select \uicontrol Tools > \uicontrol Git > + \uicontrol {Local Repository} > \uicontrol {Branches}. The checked out branch is shown in bold and underlined in the list of branches. Double-click branch names to edit them. @@ -529,6 +530,9 @@ \li \uicontrol Rebase \li Copy local commits to the updated upstream head. \row + \li \uicontrol Reset + \li Hard reset the active branch to the selected branch. + \row \li \uicontrol {Cherry Pick} \li Cherry pick the top commit from the selected branch. \row @@ -540,7 +544,8 @@ Patches are rewriting instructions that can be applied to a set of files. To apply a patch file that is open in \QC, select \uicontrol Tools > \uicontrol Git > - \uicontrol {Local Repository} > \uicontrol {Apply from Editor}. + \uicontrol {Local Repository} > \uicontrol Patch > + \uicontrol {Apply from Editor}. To select the patch file to apply from the file system, select \uicontrol {Apply from File}. diff --git a/doc/src/projects/creator-projects-creating.qdoc b/doc/src/projects/creator-projects-creating.qdoc index 17ada48109..85ce180319 100644 --- a/doc/src/projects/creator-projects-creating.qdoc +++ b/doc/src/projects/creator-projects-creating.qdoc @@ -241,6 +241,15 @@ information on how version control systems are integrated in \QC, see \l{Using Version Control Systems} + \li Import as qmake Project + + Import an existing project that does not use any of the supported + build systems: qmake, Qbs, CMake, or Autotools. The wizard creates + a qmake .pro file, which enables you to use \QC as a code editor and + as a launcher for debugging and analysis tools. However, if you want + to build the project, you might need to edit the generated .pro + file. + \li Import Existing Project Import an existing project that does not use any of the supported @@ -286,6 +295,10 @@ \list + \li Qt item model source and header files that you can use to create + classes derived from QAbstractItemModel, QAbstractTableModel, or + QAbstractListModel. + \li \QD forms and \QD form classes, which specify parts of user interfaces in Qt widget based projects @@ -293,18 +306,32 @@ application executable \li QML files, which specify items in Qt Quick projects. - \uicontrol {Qt Quick 1} creates a QML file that imports Qt Quick 1.1 and - \uicontrol {Qt Quick 2} creates a QML file that imports Qt Quick 2.0. - Select \uicontrol {Qt Quick 1} to add files to a Qt Quick 1 application - and \uicontrol {Qt Quick 2} to add files to a Qt Quick 2 application. - \uicontrol {Qt Quick UI File} creates an UI form (\e .ui.qml) and - the corresponding QML file. + \uicontrol {QML File (Qt Quick 2)} creates a QML file that imports + Qt Quick 2.0 and \uicontrol {Qt Quick UI File} creates an UI form + (\e .ui.qml) and the corresponding QML file. \li JavaScript files that you can use to write the application logic in Qt Quick projects \endlist + \li Models and state charts + + \list + + \li Universal Modeling Language (UML) style models with structured + diagrams. However, the model editor uses a variant of UML and + provides only a subset of properties for specifying the + appearance of model elements. For more information, see + \l {Modeling}. + + \li State Chart XML (SCXML) files that contain boilerplate code for + state machines. You can use the classes in the \l {Qt SCXML} + module to embed state machines created from the files in Qt + applications. + + \endlist + \li GLSL GLSL files that define fragment and vertex shaders in both Qt Quick @@ -322,6 +349,10 @@ \endlist + \li Java + + Java class files that you can use to create Java classes. + \li Python Python class and source files that you can use to create Python diff --git a/doc/src/projects/creator-projects-settings-editor.qdoc b/doc/src/projects/creator-projects-settings-editor.qdoc index 3914bc0b12..f1f49b90fb 100644 --- a/doc/src/projects/creator-projects-settings-editor.qdoc +++ b/doc/src/projects/creator-projects-settings-editor.qdoc @@ -52,7 +52,7 @@ \li Select \uicontrol Projects > \uicontrol Editor. - \li In the \uicontrol {Editor Settings} field, select \uicontrol {Custom}. + \li In the \uicontrol {Editor settings} field, select \uicontrol {Custom}. \li Specify text editor settings for the project. diff --git a/doc/src/projects/creator-projects-settings-overview.qdoc b/doc/src/projects/creator-projects-settings-overview.qdoc index 82d6ccc8d0..24dc57d081 100644 --- a/doc/src/projects/creator-projects-settings-overview.qdoc +++ b/doc/src/projects/creator-projects-settings-overview.qdoc @@ -97,7 +97,7 @@ \li \l{Using Clang Static Analyzer}{Clang Static Analyzer} - \li \l{To-Do List}{To-Do} (experimental) + \li \l{To-Do Entries}{To-Do} (experimental) \endlist diff --git a/doc/src/qtquick/creator-mobile-app-tutorial.qdoc b/doc/src/qtquick/creator-mobile-app-tutorial.qdoc index ed94c4d052..6f93fe81c2 100644 --- a/doc/src/qtquick/creator-mobile-app-tutorial.qdoc +++ b/doc/src/qtquick/creator-mobile-app-tutorial.qdoc @@ -98,7 +98,7 @@ to reference the rectangle from other places. \li Select the \uicontrol Layout tab, and then click - the \inlineimage anchor-fill-normal.png + the \inlineimage anchor_fill.png (\uicontrol {Fill to Parent}) button to anchor the rectangle to the item. diff --git a/doc/src/qtquick/qtquick-app-tutorial.qdoc b/doc/src/qtquick/qtquick-app-tutorial.qdoc index 8cc2e7e42f..d478b30d5a 100644 --- a/doc/src/qtquick/qtquick-app-tutorial.qdoc +++ b/doc/src/qtquick/qtquick-app-tutorial.qdoc @@ -109,7 +109,7 @@ size. \li In the \uicontrol Color field, click the - \inlineimage button_color_none_normal.png + \inlineimage icon_color_none.png (\uicontrol Transparent) button to make the rectangle transparent. @@ -131,7 +131,7 @@ \uicontrol Library to \e topLeftRect in the navigator. \li Click \uicontrol {Layout}, and then click the - \inlineimage anchor-fill-normal.png + \inlineimage anchor_fill.png (\uicontrol {Fill to Parent}) button to anchor the mouse area to the rectangle. diff --git a/doc/src/qtquick/qtquick-buttons.qdoc b/doc/src/qtquick/qtquick-buttons.qdoc index 71c3cb2f3d..8fb2e66d20 100644 --- a/doc/src/qtquick/qtquick-buttons.qdoc +++ b/doc/src/qtquick/qtquick-buttons.qdoc @@ -71,7 +71,7 @@ the rectangle and produce rounded corners for the button. \li Select \uicontrol {Layout}, and then select the - \inlineimage anchor-fill-normal.png + \inlineimage anchor_fill.png (\uicontrol {Fill to Parent}) button to anchor the rectangle to the item. @@ -198,7 +198,7 @@ for example button_up.png. \li Click \uicontrol {Layout}, and then click the - \inlineimage anchor-fill-normal.png + \inlineimage anchor_fill.png (\uicontrol {Fill to Parent}) button to anchor the border image to the \uicontrol Item. @@ -248,9 +248,9 @@ \endlist \li Click \uicontrol {Layout}, and then click the - \inlineimage anchor-vertical-normal.png + \inlineimage anchor_vertical.png (\uicontrol {Set Vertical Anchor}) and - \inlineimage anchor-horizontal-normal.png + \inlineimage anchor_horizontal.png (\uicontrol {Set Horizontal Anchor}) buttons to inherit the vertical and horizontal centering from the parent. diff --git a/doc/src/qtquick/qtquick-components.qdoc b/doc/src/qtquick/qtquick-components.qdoc index facf937564..dbc41d57f8 100644 --- a/doc/src/qtquick/qtquick-components.qdoc +++ b/doc/src/qtquick/qtquick-components.qdoc @@ -90,6 +90,9 @@ when compared to Qt Quick Controls, on which the module is based. These types work in conjunction with Qt Quick and Qt Quick Layouts. + Since Qt 5.7, \l {Qt Quick Controls 2} replace Qt Quick Controls 1 and + Qt Labs Controls. + Some ready-made controls, such as a gauge, dial, status indicator, and tumbler, are provided by the \l {Qt Quick Extras} module. @@ -104,7 +107,7 @@ \list 1 \li Select \uicontrol File > \uicontrol {New File or Project} > - \uicontrol {Files and Classes} > \uicontrol Qt > \uicontrol {QML File (Qt Quick 1)} or + \uicontrol {Files and Classes} > \uicontrol Qt > \uicontrol {QML File (Qt Quick 2)} > \uicontrol Choose to create a new .qml file. diff --git a/doc/src/qtquick/qtquick-connection-editor.qdoc b/doc/src/qtquick/qtquick-connection-editor.qdoc index 236d3f9bbc..a9ff30855b 100644 --- a/doc/src/qtquick/qtquick-connection-editor.qdoc +++ b/doc/src/qtquick/qtquick-connection-editor.qdoc @@ -108,13 +108,13 @@ \li Select \uicontrol Item to select the target object whose property you want to change dynamically. - \li Select \uicontrol Property to specify the property to bind to a source + \li Select \uicontrol Property to select the property to bind to a source property. - \li Select \uicontrol {Source Item} to specify the object whose property you + \li Select \uicontrol {Source Item} to select the object whose property you want to use to determine the behavior of the target object. - \li Select \uicontrol {Source Property} to specify the property to bind the + \li Select \uicontrol {Source Property} to select the property to bind the target property to. \endlist diff --git a/doc/src/qtquick/qtquick-creating.qdoc b/doc/src/qtquick/qtquick-creating.qdoc index 19c61dbd0b..7b1e09a09c 100644 --- a/doc/src/qtquick/qtquick-creating.qdoc +++ b/doc/src/qtquick/qtquick-creating.qdoc @@ -92,16 +92,18 @@ \uicontrol {Qt Quick Controls Application}, or \uicontrol {Qt Labs Controls Application} > \uicontrol Choose. - \li In the \uicontrol {Minimal required Qt version} field, select the Qt - version to develop with. The Qt version determines the Qt Quick - imports that are used in the QML files. + \li For some Qt Quick applications, you must select the Qt version to + develop with in the \uicontrol {Minimal required Qt version} field. + The Qt version determines the Qt Quick imports that are used in the + QML files. - \li Select the \uicontrol {With .ui.qml file} check box to create an UI + \li For some Qt Quick applications, you can select the + \uicontrol {With .ui.qml file} check box to create an UI form that can contain a subset of the QML language. Similarly as with the UI forms for \QD, it is recommended that you use \QMLD to edit the UI forms. For more information, see \l{Qt Quick UI Forms}. - \li For a Qt Quick Controls application, you can also select the + \li For some Qt Quick applications, you can also select the \uicontrol {Enable native styling} check box. \QC adds a dependency to the Qt Widgets module to the \c .pro file. diff --git a/doc/src/qtquick/qtquick-designer.qdoc b/doc/src/qtquick/qtquick-designer.qdoc index b2738f38ec..7a143d24c4 100644 --- a/doc/src/qtquick/qtquick-designer.qdoc +++ b/doc/src/qtquick/qtquick-designer.qdoc @@ -113,7 +113,7 @@ you remove an item, the child items are also removed. You can show and hide items to focus on specific parts of the application. - Click the \inlineimage button_color_none_normal.png + Click the \inlineimage icon_color_none.png (\uicontrol Transparent) button to change the visibility of an item on the canvas. To change the visibility of an item in the application, select the \uicontrol Visibility diff --git a/doc/src/qtquick/qtquick-screens.qdoc b/doc/src/qtquick/qtquick-screens.qdoc index aa6429345d..cc76d9f2f2 100644 --- a/doc/src/qtquick/qtquick-screens.qdoc +++ b/doc/src/qtquick/qtquick-screens.qdoc @@ -57,6 +57,9 @@ when compared to Qt Quick Controls, on which the module is based. These types work in conjunction with Qt Quick and Qt Quick Layouts. + Since Qt 5.7, \l {Qt Quick Controls 2} replace Qt Quick Controls 1 and + Qt Labs Controls. + \section1 Adding Components to Screens \list 1 diff --git a/doc/src/qtquick/qtquick-uiforms-tutorial.qdoc b/doc/src/qtquick/qtquick-uiforms-tutorial.qdoc index c305d8b1dd..a4b1aea33d 100644 --- a/doc/src/qtquick/qtquick-uiforms-tutorial.qdoc +++ b/doc/src/qtquick/qtquick-uiforms-tutorial.qdoc @@ -73,7 +73,7 @@ \li Select the split view in the navigator, then select the \uicontrol Layout tab in \uicontrol Properties (4), and then click - the \inlineimage anchor-fill-normal.png + the \inlineimage anchor_fill.png (\uicontrol {Fill to Parent}) button to anchor the split view to the item. diff --git a/qbs/imports/QtcAutotest.qbs b/qbs/imports/QtcAutotest.qbs index 35d67e7af2..586626b22d 100644 --- a/qbs/imports/QtcAutotest.qbs +++ b/qbs/imports/QtcAutotest.qbs @@ -26,7 +26,7 @@ QtcProduct { // The following would be conceptually right, but does not work currently as some autotests // (e.g. extensionsystem) do not work when installed, because they want hardcoded // absolute paths to resources in the build directory. - // cpp.rpaths: qbs.targetOS.contains("osx") + // cpp.rpaths: qbs.targetOS.contains("macos") // ? ["@loader_path/../Frameworks", "@loader_path/../PlugIns"] // : ["$ORIGIN/../" + qtc.libDirName + "/qtcreator", // "$ORIGIN/../" qtc.libDirName + "/qtcreator/plugins"] diff --git a/qbs/imports/QtcDocumentation.qbs b/qbs/imports/QtcDocumentation.qbs index 350033be17..c98ee8dec3 100644 --- a/qbs/imports/QtcDocumentation.qbs +++ b/qbs/imports/QtcDocumentation.qbs @@ -28,7 +28,7 @@ Product { Group { fileTagsFilter: ["qch"] - qbs.install: !qbs.targetOS.contains("osx") + qbs.install: !qbs.targetOS.contains("macos") qbs.installDir: qtc.ide_doc_path } } diff --git a/qbs/imports/QtcFunctions/functions.js b/qbs/imports/QtcFunctions/functions.js index 23a51f80e8..c9dd1cf3a0 100644 --- a/qbs/imports/QtcFunctions/functions.js +++ b/qbs/imports/QtcFunctions/functions.js @@ -4,7 +4,7 @@ function qtLibraryName(qbs, name) if (qbs.debugInformation) { if (qbs.targetOS.contains("windows")) return name + "d"; - else if (qbs.targetOS.contains("osx")) + else if (qbs.targetOS.contains("macos")) return name + "_debug"; } return name; diff --git a/qbs/imports/QtcLibrary.qbs b/qbs/imports/QtcLibrary.qbs index e4dd782b11..5c54ba8894 100644 --- a/qbs/imports/QtcLibrary.qbs +++ b/qbs/imports/QtcLibrary.qbs @@ -18,14 +18,14 @@ QtcProduct { var flags = base; if (qbs.buildVariant == "debug" && qbs.toolchain.contains("msvc")) flags.push("/INCREMENTAL:NO"); // Speed up startup time when debugging with cdb - if (qbs.targetOS.contains("osx")) + if (qbs.targetOS.contains("macos")) flags.push("-compatibility_version", qtc.qtcreator_compat_version); return flags; } - cpp.sonamePrefix: qbs.targetOS.contains("osx") + cpp.sonamePrefix: qbs.targetOS.contains("macos") ? "@rpath" : undefined - cpp.rpaths: qbs.targetOS.contains("osx") + cpp.rpaths: qbs.targetOS.contains("macos") ? ["@loader_path/../Frameworks"] : ["$ORIGIN", "$ORIGIN/.."] property string libIncludeBase: ".." // #include <lib/header.h> diff --git a/qbs/imports/QtcPlugin.qbs b/qbs/imports/QtcPlugin.qbs index 7e2488eb49..84806a6f30 100644 --- a/qbs/imports/QtcPlugin.qbs +++ b/qbs/imports/QtcPlugin.qbs @@ -27,17 +27,17 @@ QtcProduct { cpp.internalVersion: "" cpp.defines: base.concat([name.toUpperCase() + "_LIBRARY"]) - cpp.sonamePrefix: qbs.targetOS.contains("osx") + cpp.sonamePrefix: qbs.targetOS.contains("macos") ? "@rpath" : undefined - cpp.rpaths: qbs.targetOS.contains("osx") + cpp.rpaths: qbs.targetOS.contains("macos") ? ["@loader_path/../Frameworks", "@loader_path/../PlugIns"] : ["$ORIGIN", "$ORIGIN/.."] cpp.linkerFlags: { var flags = base; if (qbs.buildVariant == "debug" && qbs.toolchain.contains("msvc")) flags.push("/INCREMENTAL:NO"); // Speed up startup time when debugging with cdb - if (qbs.targetOS.contains("osx")) + if (qbs.targetOS.contains("macos")) flags.push("-compatibility_version", qtc.qtcreator_compat_version); return flags; } diff --git a/qbs/imports/QtcTool.qbs b/qbs/imports/QtcTool.qbs index e8dd54efaa..304e2e87a9 100644 --- a/qbs/imports/QtcTool.qbs +++ b/qbs/imports/QtcTool.qbs @@ -12,7 +12,7 @@ QtcProduct { '/' + qtc.ide_library_path); var relativePathToPlugins = FileInfo.relativePath('/' + qtc.ide_libexec_path, '/' + qtc.ide_plugin_path); - var prefix = qbs.targetOS.contains("osx") ? "@executable_path" : "$ORIGIN"; + var prefix = qbs.targetOS.contains("macos") ? "@executable_path" : "$ORIGIN"; return [ FileInfo.joinPaths(prefix, relativePathToLibs), FileInfo.joinPaths(prefix, relativePathToPlugins) diff --git a/qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs b/qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs index 88128a97d1..00d2d34bdd 100644 --- a/qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs +++ b/qbs/modules/qbsbuildconfig/qbsbuildconfig.qbs @@ -8,7 +8,7 @@ Module { property bool enableProjectFileUpdates: true property bool installApiHeaders: false property string libInstallDir: qtc.ide_library_path - property stringList libRPaths: qbs.targetOS.contains("osx") + property stringList libRPaths: qbs.targetOS.contains("macos") ? ["@loader_path/" + FileInfo.relativePath('/' + appInstallDir, '/' + libInstallDir)] : ["$ORIGIN/..", "$ORIGIN/../" + qtc.ide_library_path] property string resourcesInstallDir: qtc.ide_data_path + "/qbs" diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index 27d4dc608f..b86dbb3edb 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -16,10 +16,10 @@ Module { + ide_compat_version_minor + '.' + ide_compat_version_release property string libDirName: "lib" - property string ide_app_path: qbs.targetOS.contains("osx") ? "" : "bin" - property string ide_app_target: qbs.targetOS.contains("osx") ? "Qt Creator" : "qtcreator" + property string ide_app_path: qbs.targetOS.contains("macos") ? "" : "bin" + property string ide_app_target: qbs.targetOS.contains("macos") ? "Qt Creator" : "qtcreator" property string ide_library_path: { - if (qbs.targetOS.contains("osx")) + if (qbs.targetOS.contains("macos")) return ide_app_target + ".app/Contents/Frameworks" else if (qbs.targetOS.contains("windows")) return ide_app_path @@ -27,24 +27,24 @@ Module { return libDirName + "/qtcreator" } property string ide_plugin_path: { - if (qbs.targetOS.contains("osx")) + if (qbs.targetOS.contains("macos")) return ide_app_target + ".app/Contents/PlugIns" else if (qbs.targetOS.contains("windows")) return libDirName + "/qtcreator/plugins" else return ide_library_path + "/plugins" } - property string ide_data_path: qbs.targetOS.contains("osx") + property string ide_data_path: qbs.targetOS.contains("macos") ? ide_app_target + ".app/Contents/Resources" : "share/qtcreator" - property string ide_libexec_path: qbs.targetOS.contains("osx") + property string ide_libexec_path: qbs.targetOS.contains("macos") ? ide_data_path : qbs.targetOS.contains("windows") ? ide_app_path : "libexec/qtcreator" - property string ide_bin_path: qbs.targetOS.contains("osx") + property string ide_bin_path: qbs.targetOS.contains("macos") ? ide_app_target + ".app/Contents/MacOS" : ide_app_path - property string ide_doc_path: qbs.targetOS.contains("osx") + property string ide_doc_path: qbs.targetOS.contains("macos") ? ide_data_path + "/doc" : "share/doc/qtcreator" property string ide_include_path: "include" diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py index 3e6c6f15aa..eb8469bf5a 100644 --- a/share/qtcreator/debugger/gdbbridge.py +++ b/share/qtcreator/debugger/gdbbridge.py @@ -256,11 +256,6 @@ class Dumper(DumperBase): self.qtNamespaceToReport = None self.interpreterBreakpointResolvers = [] - # The guess does not need to be updated during a fetchVariables() - # as the result is fixed during that time (ignoring "active" - # dumpers causing loading of shared objects etc). - self.currentQtNamespaceGuess = None - def prepare(self, args): self.output = [] self.currentIName = "" @@ -294,6 +289,11 @@ class Dumper(DumperBase): #warn("EXPANDED INAMES: %s" % self.expandedINames) #warn("WATCHERS: %s" % self.watchers) + # The guess does not need to be updated during a fetchVariables() + # as the result is fixed during that time (ignoring "active" + # dumpers causing loading of shared objects etc). + self.currentQtNamespaceGuess = None + def listOfLocals(self): frame = gdb.selected_frame() diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 8e4cb83ef1..afbff9099f 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -206,7 +206,7 @@ class Dumper(DumperBase): self.currentType = ReportItem() self.currentNumChild = None self.currentMaxNumChild = None - self.currentPrintsAddress = None + self.currentPrintsAddress = True self.currentChildType = None self.currentChildNumChild = -1 self.currentWatchers = {} @@ -250,12 +250,14 @@ class Dumper(DumperBase): if item.name == '**&': item.name = '*' self.put('name="%s",' % item.name) + item.savedCurrentAddress = self.currentAddress item.savedIName = self.currentIName item.savedValue = self.currentValue item.savedType = self.currentType self.currentIName = item.iname self.currentValue = ReportItem() self.currentType = ReportItem() + self.currentAddress = None def exitSubItem(self, item, exType, exValue, exTraceBack): if not exType is None: @@ -278,10 +280,13 @@ class Dumper(DumperBase): self.put('value="%s",' % self.currentValue.value) except: pass + if not self.currentAddress is None: + self.put(self.currentAddress) self.put('},') self.currentIName = item.savedIName self.currentValue = item.savedValue self.currentType = item.savedType + self.currentAddress = item.savedCurrentAddress return True def stateName(self, s): @@ -962,7 +967,7 @@ class Dumper(DumperBase): #if int(addr) == 0xffffffffffffffff: # raise RuntimeError("Illegal address") if self.currentPrintsAddress and not addr is None: - self.put('address="0x%x",' % int(addr)) + self.currentAddress = 'address="0x%x",' % toInteger(addr) def isFunctionType(self, typeobj): if self.isGoodLldb: @@ -1174,6 +1179,7 @@ class Dumper(DumperBase): return self.output = '' + self.currentAddress = None partialVariable = args.get('partialvar', "") isPartial = len(partialVariable) > 0 diff --git a/share/qtcreator/qmldesigner/common/DesignerScrollViewStyle.qml b/share/qtcreator/qmldesigner/common/DesignerScrollViewStyle.qml index ba826a424a..0b21e2bbfb 100644 --- a/share/qtcreator/qmldesigner/common/DesignerScrollViewStyle.qml +++ b/share/qtcreator/qmldesigner/common/DesignerScrollViewStyle.qml @@ -29,8 +29,7 @@ import QtQuick.Controls.Styles 1.1 ScrollViewStyle { readonly property color scrollbarColor: creatorTheme.BackgroundColorDark - readonly property color scrollbarBorderColor: creatorTheme.QmlDesignerBackgroundColorDarker - readonly property color scrollBarHandleColor: creatorTheme.QmlDesignerBackgroundColorLighter + readonly property color scrollBarHandleColor: creatorTheme.QmlDesignerButtonColor padding {left: 0; top: 0; right: 0; bottom: 0} @@ -38,15 +37,11 @@ ScrollViewStyle { height: 10 width: 10 color: scrollbarColor - border.width: 1 - border.color: scrollbarBorderColor } handle: Item { implicitWidth: 10 implicitHeight: 10 Rectangle { - border.color: scrollbarBorderColor - border.width: 1 anchors.fill: parent color: scrollBarHandleColor } diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml index e32c19de79..f7836ffdf5 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml @@ -27,56 +27,58 @@ import QtQuick 2.1 import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.0 -Rectangle { - color: creatorTheme.QmlDesignerBackgroundColorLighter - - border.color: creatorTheme.BackgroundColorDark - border.width: 1 +Item { + Rectangle { + anchors.rightMargin: 1 + anchors.topMargin: 1 + anchors.fill: parent + color: creatorTheme.QmlDesignerButtonColor - Image { - id: itemIcon // to be set by model + Image { + id: itemIcon // to be set by model - anchors.top: parent.top - anchors.topMargin: styleConstants.cellVerticalMargin - anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: styleConstants.cellVerticalMargin + anchors.horizontalCenter: parent.horizontalCenter - width: itemLibraryIconWidth // to be set in Qml context - height: itemLibraryIconHeight // to be set in Qml context - source: itemLibraryIconPath // to be set by model - } + width: itemLibraryIconWidth // to be set in Qml context + height: itemLibraryIconHeight // to be set in Qml context + source: itemLibraryIconPath // to be set by model + } - Text { - id: text - font.pixelSize: 9 - elide: Text.ElideMiddle - wrapMode: Text.WordWrap - anchors.top: itemIcon.bottom - anchors.topMargin: styleConstants.cellVerticalSpacing - anchors.left: parent.left - anchors.leftMargin: styleConstants.cellHorizontalMargin - anchors.right: parent.right - anchors.rightMargin: styleConstants.cellHorizontalMargin - anchors.bottom: parent.bottom - anchors.bottomMargin: styleConstants.cellHorizontalMargin + Text { + id: text + font.pixelSize: 9 + elide: Text.ElideMiddle + wrapMode: Text.WordWrap + anchors.top: itemIcon.bottom + anchors.topMargin: styleConstants.cellVerticalSpacing + anchors.left: parent.left + anchors.leftMargin: styleConstants.cellHorizontalMargin + anchors.right: parent.right + anchors.rightMargin: styleConstants.cellHorizontalMargin + anchors.bottom: parent.bottom + anchors.bottomMargin: styleConstants.cellHorizontalMargin - verticalAlignment: Qt.AlignVCenter - horizontalAlignment: Qt.AlignHCenter - text: itemName // to be set by model - color: creatorTheme.PanelTextColorLight - renderType: Text.NativeRendering - } + verticalAlignment: Qt.AlignVCenter + horizontalAlignment: Qt.AlignHCenter + text: itemName // to be set by model + color: creatorTheme.PanelTextColorLight + renderType: Text.NativeRendering + } - MouseArea { - id: mouseRegion - anchors.fill: parent + MouseArea { + id: mouseRegion + anchors.fill: parent - property bool reallyPressed: false - property int pressedX - property int pressedY + property bool reallyPressed: false + property int pressedX + property int pressedY - onPressed: { - rootView.startDragAndDrop(itemLibraryEntry) + onPressed: { + rootView.startDragAndDrop(itemLibraryEntry) + } } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml index 76de3d54ea..af29773ce2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentHorizontalButtons.qml @@ -30,10 +30,11 @@ Row { id: alignmentHorizontalButtons RoundedPanel { - width: 14 + width: 16 height: parent.height roundLeft: true ExtendedFunctionButton { + x: 2 anchors.verticalCenter: parent.verticalCenter backendValue: alignmentHorizontalButtons.backendValue } @@ -48,6 +49,8 @@ Row { property bool baseStateFlag: isBaseState; onValueChanged: { + buttonRow.initalChecked = 0 + buttonRow.checkedIndex = 0 if (value !== undefined) { if (value === "AlignLeft") { buttonRow.initalChecked = 0 @@ -92,21 +95,21 @@ Row { ButtonRowButton { roundLeftButton: false - iconSource: blueHighlight ? "images/alignmentleft-h-icon.png" : "images/alignmentleft-icon.png" + iconSource: "image://icons/alignment-left" + (blueHighlight ? "-h" : "") onClicked: { if (checked) backendValue.setEnumeration("Text", "AlignLeft") } } ButtonRowButton { - iconSource: blueHighlight ? "images/alignmentcenterh-h-icon.png" : "images/alignmentcenterh-icon.png" + iconSource: "image://icons/alignment-center" + (blueHighlight ? "-h" : "") onClicked: { if (checked) backendValue.setEnumeration("Text", "AlignHCenter") } } ButtonRowButton { - iconSource: blueHighlight ? "images/alignmentright-h-icon.png" : "images/alignmentright-icon.png" + iconSource: "image://icons/alignment-right" + (blueHighlight ? "-h" : "") onClicked: { if (checked) backendValue.setEnumeration("Text", "AlignRight") diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml index ba2b43721c..ac3bd20f35 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AligmentVerticalButtons.qml @@ -30,11 +30,12 @@ Row { id: alignmentVerticalButtons RoundedPanel { - width: 14 + width: 16 height: parent.height roundLeft: true ExtendedFunctionButton { + x: 2 anchors.verticalCenter: parent.verticalCenter backendValue: alignmentVerticalButtons.backendValue } @@ -49,6 +50,8 @@ Row { property bool baseStateFlag: isBaseState; onValueChanged: { + buttonRow.initalChecked = 0 + buttonRow.checkedIndex = 0 if (value !== undefined) { if (value === "AlignTop") { buttonRow.initalChecked = 0 @@ -93,21 +96,21 @@ Row { ButtonRowButton { roundLeftButton: false - iconSource: blueHighlight ? "images/alignmenttop-h-icon.png" : "images/alignmenttop-icon.png" + iconSource: "image://icons/alignment-top" + (blueHighlight ? "-h" : "") onClicked: { if (checked) backendValue.setEnumeration("Text", "AlignTop") } } ButtonRowButton { - iconSource: blueHighlight ? "images/alignmentmiddle-h-icon.png" : "images/alignmentmiddle-icon.png" + iconSource: "image://icons/alignment-middle" + (blueHighlight ? "-h" : "") onClicked: { if (checked) backendValue.setEnumeration("Text", "AlignVCenter") } } ButtonRowButton { - iconSource: blueHighlight ? "images/alignmentbottom-h-icon.png" : "images/alignmentbottom-icon.png" + iconSource: "image://icons/alignment-bottom" + (blueHighlight ? "-h" : "") onClicked: { if (checked) backendValue.setEnumeration("Text", "AlignBottom") diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml index 58e8df834d..e7f9859ee4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/AnchorButtons.qml @@ -33,7 +33,7 @@ ButtonRow { id: buttonRow ButtonRowButton { - iconSource: "images/anchor-top.png" + iconSource: "image://icons/anchor-top" tooltip: qsTr("Anchor item to the top.") property bool topAnchored: anchorBackend.topAnchored @@ -53,7 +53,7 @@ ButtonRow { } ButtonRowButton { - iconSource: "images/anchor-bottom.png" + iconSource: "image://icons/anchor-bottom" tooltip: qsTr("Anchor item to the bottom.") property bool bottomAnchored: anchorBackend.bottomAnchored @@ -74,7 +74,7 @@ ButtonRow { } ButtonRowButton { - iconSource: "images/anchor-left.png" + iconSource: "image://icons/anchor-left" tooltip: qsTr("Anchor item to the left.") property bool leftAnchored: anchorBackend.leftAnchored @@ -94,7 +94,7 @@ ButtonRow { } ButtonRowButton { - iconSource: "images/anchor-right.png" + iconSource: "image://icons/anchor-right" tooltip: qsTr("Anchor item to the right.") property bool rightAnchored: anchorBackend.rightAnchored @@ -119,7 +119,7 @@ ButtonRow { ButtonRowButton { - iconSource: "images/anchor-fill.png" + iconSource: "image://icons/anchor-fill" tooltip: qsTr("Fill parent item.") property bool isFilled: anchorBackend.isFilled @@ -141,7 +141,7 @@ ButtonRow { } ButtonRowButton { - iconSource: "images/anchor-vertical.png" + iconSource: "image://icons/anchor-vertical" tooltip: qsTr("Anchor item vertically.") property bool verticalCentered: anchorBackend.verticalCentered; @@ -163,7 +163,7 @@ ButtonRow { } ButtonRowButton { - iconSource: "images/anchor-horizontal.png" + iconSource: "image://icons/anchor-horizontal" tooltip: qsTr("Anchor item horizontally.") property bool horizontalCentered: anchorBackend.horizontalCentered; diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/BoolButtonRowButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/BoolButtonRowButton.qml index adad22f083..2b413caaef 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/BoolButtonRowButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/BoolButtonRowButton.qml @@ -83,7 +83,7 @@ ButtonRowButton { ExtendedFunctionButton { backendValue: boolButtonRowButton.backendValue - x: 0 - y: 4 + x: 2 + anchors.verticalCenter: parent.verticalCenter } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml index 794cdd0053..8b956fb6c4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ButtonRowButton.qml @@ -65,7 +65,6 @@ Item { anchors.fill: parent RoundedPanel { roundLeft: isFirst() && buttonRowButton.roundLeftButton - roundRight: isLast() anchors.fill: parent visible: checked @@ -74,19 +73,19 @@ Item { RoundedPanel { roundLeft: isFirst() - roundRight: isLast() anchors.fill: parent visible: !checked - color: creatorTheme.BackgroundColorDark + color: creatorTheme.QmlDesignerButtonColor } } Image { id: image - //source: iconSource + width: 16 + height: 16 + smooth: false anchors.centerIn: parent - anchors.leftMargin: leftPadding } ToolTipArea { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CheckBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CheckBox.qml index 263e154bf0..d69490d53a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CheckBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CheckBox.qml @@ -39,6 +39,7 @@ Controls.CheckBox { ExtendedFunctionButton { x: 22 + anchors.verticalCenter: parent.verticalCenter backendValue: checkBox.backendValue visible: checkBox.enabled } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorLogic.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorLogic.qml index 551899f93d..f76a4becc4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorLogic.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorLogic.qml @@ -40,7 +40,7 @@ QtObject { property bool highlight: textColor === __changedTextColor property color __defaultTextColor: creatorTheme.PanelTextColorLight - property color __changedTextColor: Constants.colorsChangedBaseText + readonly property color __changedTextColor: creatorTheme.QmlDesigner_HighlightColor onBackendValueChanged: { evaluate(); @@ -68,7 +68,7 @@ QtObject { if (baseStateFlag) { if (innerObject.backendValue.isInModel) - innerObject.textColor = Constants.colorsChangedBaseText + innerObject.textColor = __changedTextColor else innerObject.textColor = creatorTheme.PanelTextColorLight } else { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml index 8f98203271..08f76b4f25 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ComboBox.qml @@ -112,7 +112,7 @@ Controls.ComboBox { ExtendedFunctionButton { x: 2 - y: 6 + anchors.verticalCenter: parent.verticalCenter backendValue: comboBox.backendValue visible: comboBox.enabled } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Constants.js b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Constants.js index 7312b76238..228bb1e4be 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Constants.js +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/Constants.js @@ -28,5 +28,4 @@ var colorsDisabledText = "gray" var colorsDefaultText = "white" var colorsBoldText = "#dedede" -var colorsChangedBaseText = "#9999ff" var colorsChangedStateText = "#99ccff" diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomCheckBoxStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomCheckBoxStyle.qml index 054c807ec4..b553c81d0d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomCheckBoxStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomCheckBoxStyle.qml @@ -38,7 +38,7 @@ CheckBoxStyle { color: control.pressed ? creatorTheme.FancyToolButtonHoverColor : creatorTheme.FancyToolButtonSelectedColor - border.color: creatorTheme.QmlDesignerBackgroundColorDarker + border.color: creatorTheme.QmlDesignerBorderColor anchors.margins: 1 } Image { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml index 680317bd8a..97d10c2c78 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml @@ -35,35 +35,24 @@ ComboBoxStyle { background: Item { implicitWidth: 120 - implicitHeight: 25 + implicitHeight: 24 Rectangle { anchors.fill: parent visible: !control.pressed - color: creatorTheme.FancyToolButtonSelectedColor - border.color: creatorTheme.QmlDesignerBackgroundColorDarker + color: creatorTheme.QmlDesignerButtonColor + border.color: creatorTheme.QmlDesignerBorderColor border.width: 1 } Rectangle { - color: creatorTheme.FancyToolButtonHoverColor + color: creatorTheme.QmlDesignerBackgroundColorDarker anchors.fill: parent visible: control.pressed - border.color: creatorTheme.QmlDesignerBackgroundColorDarker + border.color: creatorTheme.QmlDesignerBorderColor border.width: 1 } - Rectangle { - color: creatorTheme.IconsBaseColor - width: 1 - anchors.right: imageItem.left - anchors.topMargin: 4 - anchors.bottomMargin: 4 - anchors.rightMargin: 6 - anchors.top: parent.top - anchors.bottom: parent.bottom - } - Image { id: imageItem width: 8 diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml index 82adcd00e4..bdfb067640 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomSpinBoxStyle.qml @@ -60,14 +60,14 @@ SpinBoxStyle { height: 4 source: "image://icons/down-arrow" x: 1 - y: 2.5 // Hack! Spinbox sets an non-int offset, somewhere + y: 3 } } background: Rectangle { implicitWidth: Math.max(64, styleData.contentWidth) - implicitHeight: 23 - color: creatorTheme.FancyToolButtonSelectedColor - border.color: creatorTheme.QmlDesignerBackgroundColorDarker + implicitHeight: 24 + color: creatorTheme.QmlDesignerBackgroundColorDarker + border.color: creatorTheme.QmlDesignerBorderColor } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml index 0e795d190b..2eaf898b6a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExtendedFunctionButton.qml @@ -125,105 +125,140 @@ Item { } } - Rectangle { - parent: itemPane - visible: false - x: 10 - color: "#424242" - - radius: 3 - border.color: "black" - gradient: Gradient { - GradientStop {color: "#2c2c2c" ; position: 0} - GradientStop {color: "#343434" ; position: 0.15} - GradientStop {color: "#373737" ; position: 1.0} + Item { + + Rectangle { + anchors.fill: parent + color: creatorTheme.QmlDesignerBackgroundColorDarker + opacity: 0.6 + } + + MouseArea { + anchors.fill: parent } + id: expressionDialog + visible: false + parent: itemPane + + anchors.fill: parent + - onVisibleChanged: { - var pos = itemPane.mapFromItem(extendedFunctionButton.parent, 0, 0); - y = pos.y + 2; - } - width: parent.width - 20 - height: 120 - - Controls.TextField { - id: textField - anchors.fill: parent - anchors.leftMargin: 4 - anchors.rightMargin: 4 - anchors.topMargin: 4 - anchors.bottomMargin: 20 - onAccepted: { - backendValue.expression = textField.text - expressionDialog.visible = false + Rectangle { + x: 4 + onVisibleChanged: { + var pos = itemPane.mapFromItem(extendedFunctionButton.parent, 0, 0); + y = pos.y + 2; } - style: TextFieldStyle { - textColor: Constants.colorsDefaultText - padding.top: 3 - padding.bottom: 1 - padding.left: 16 - placeholderTextColor: "gray" - background: Rectangle { - implicitWidth: 100 - implicitHeight: 23 - radius: 3 - gradient: Gradient { - GradientStop {color: "#2c2c2c" ; position: 0} - GradientStop {color: "#343434" ; position: 0.15} - GradientStop {color: "#373737" ; position: 1.0} + width: parent.width - 8 + height: 160 + + radius: 2 + color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate + border.color: creatorTheme.QmlDesignerBorderColor + + Label { + x: 8 + y: 6 + font.bold: true + text: qsTr("Binding Editor") + } + + Controls.TextField { + verticalAlignment: Text.AlignTop + id: textField + anchors.fill: parent + anchors.leftMargin: 8 + anchors.rightMargin: 8 + anchors.topMargin: 24 + anchors.bottomMargin: 32 + onAccepted: { + backendValue.expression = textField.text + expressionDialog.visible = false + } + + style: TextFieldStyle { + textColor: creatorTheme.PanelTextColorLight + padding.top: 6 + padding.bottom: 2 + padding.left: 6 + placeholderTextColor: creatorTheme.PanelTextColorMid + background: Rectangle { + implicitWidth: 100 + implicitHeight: 23 + radius: 2 + color: creatorTheme.QmlDesignerBackgroundColorDarker + border.color: creatorTheme.QmlDesignerBorderColor } } } - } - Row { - spacing: 0 - Button { - style: ButtonStyle { - background: Image { - source: "images/apply.png" - Rectangle { - opacity: control.pressed ? 0.5 : 0 - anchors.fill: parent - gradient: Gradient { - GradientStop {color: "#606060" ; position: 0} - GradientStop {color: "#404040" ; position: 0.07} - GradientStop {color: "#303030" ; position: 1} + Row { + spacing: 2 + Button { + width: 16 + height: 16 + style: ButtonStyle { + background: Item{ + Image { + width: 16 + height: 16 + source: "image://icons/error" + opacity: { + if (control.pressed) + return 0.8; + return 1.0; + } + Rectangle { + z: -1 + anchors.fill: parent + color: control.pressed || control.hovered ? creatorTheme.QmlDesignerBackgroundColorDarker : creatorTheme.QmlDesignerButtonColor + border.color: creatorTheme.QmlDesignerBorderColor + radius: 2 + } } } } + onClicked: { + backendValue.expression = textField.text + expressionDialog.visible = false + } } - onClicked: { - backendValue.expression = textField.text - expressionDialog.visible = false - } - } - Button { - style: ButtonStyle { - background: Image { - source: "images/cancel.png" - - Rectangle { - opacity: control.pressed ? 0.5 : 0 - anchors.fill: parent - gradient: Gradient { - GradientStop {color: "#606060" ; position: 0} - GradientStop {color: "#404040" ; position: 0.07} - GradientStop {color: "#303030" ; position: 1} + Button { + width: 16 + height: 16 + style: ButtonStyle { + background: Item { + Image { + width: 16 + height: 16 + source: "image://icons/ok" + opacity: { + if (control.pressed) + return 0.8; + return 1.0; + } + Rectangle { + z: -1 + anchors.fill: parent + color: control.pressed || control.hovered ? creatorTheme.QmlDesignerBackgroundColorDarker : creatorTheme.QmlDesignerButtonColor + border.color: creatorTheme.QmlDesignerBorderColor + radius: 2 + } } } } + onClicked: { + expressionDialog.visible = false + } } - onClicked: { - expressionDialog.visible = false - } + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.margins: 4 } - anchors.right: parent.right - anchors.bottom: parent.bottom } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FlickableSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FlickableSection.qml index b172785ecd..7a90e89413 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FlickableSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FlickableSection.qml @@ -51,7 +51,7 @@ Section { } Label { - text: "W" + text: "H" width: 12 } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml index 6b8c0fea64..dafd287dd8 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml @@ -68,7 +68,7 @@ Controls.ComboBox { ExtendedFunctionButton { x: 2 - y: 4 + anchors.verticalCenter: parent.verticalCenter backendValue: comboBox.backendValue visible: comboBox.enabled } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml index 911b93271c..e74c5c329a 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml @@ -95,7 +95,7 @@ Section { SpinBox { id: sizeSpinBox minimumValue: 0 - //visible: !sizeWidget.pixelSize + visible: !sizeWidget.pixelSize z: !sizeWidget.pixelSize ? 1 : 0 maximumValue: 400 backendValue: pointSize @@ -103,7 +103,7 @@ Section { SpinBox { minimumValue: 0 - //visible: sizeWidget.pixelSize + visible: sizeWidget.pixelSize z: sizeWidget.pixelSize ? 1 : 0 maximumValue: 400 backendValue: pixelSize @@ -113,6 +113,7 @@ Section { Controls.ComboBox { id: sizeType model: ["pixels", "points"] + property color textColor: creatorTheme.PanelTextColorLight onCurrentIndexChanged: { if (sizeWidget.isSetup) return; diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontStyleButtons.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontStyleButtons.qml index 4ab413a087..23e5db53e5 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontStyleButtons.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontStyleButtons.qml @@ -34,24 +34,24 @@ ButtonRow { property variant strikeout: backendValues.font_strikeout BoolButtonRowButton { - standardIconSource: "images/bold-icon.png" - highlightedIconSource: "images/bold-h-icon.png" + standardIconSource: "image://icons/style-bold" + highlightedIconSource: "image://icons/style-bold-h" backendValue: bold } BoolButtonRowButton { - standardIconSource: "images/italic-icon.png" - highlightedIconSource: "images/italic-h-icon.png" + standardIconSource: "image://icons/style-italic" + highlightedIconSource: "image://icons/style-italic-h" backendValue: italic } BoolButtonRowButton { - standardIconSource: "images/underline-icon.png" - highlightedIconSource: "images/underline-h-icon.png" + standardIconSource: "image://icons/style-underline" + highlightedIconSource: "image://icons/style-underline-h" backendValue: underline } BoolButtonRowButton { - standardIconSource: "images/strikeout-icon.png" - highlightedIconSource: "images/strikeout-h-icon.png" + standardIconSource: "image://icons/style-strikeout" + highlightedIconSource: "image://icons/style-strikeout-h" backendValue: strikeout } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/IconLabel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/IconLabel.qml index 50bdd33965..9306539a3b 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/IconLabel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/IconLabel.qml @@ -38,7 +38,7 @@ Item { height: 16 Image { id: image - anchors.centerIn: parent + anchors.fill: parent } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml index 56c651859b..afabd39276 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml @@ -52,7 +52,7 @@ Controls.TextField { ExtendedFunctionButton { x: 2 - y: 6 + anchors.verticalCenter: parent.verticalCenter backendValue: lineEdit.backendValue visible: lineEdit.enabled && showExtendedFunctionButton } @@ -118,8 +118,8 @@ Controls.TextField { background: Rectangle { implicitWidth: 100 implicitHeight: 24 - color: creatorTheme.FancyToolButtonSelectedColor - border.color: creatorTheme.QmlDesignerBackgroundColorDarker + color: creatorTheme.QmlDesignerBackgroundColorDarker + border.color: creatorTheme.QmlDesignerBorderColor } } @@ -172,10 +172,8 @@ Controls.TextField { y: 1 Rectangle { anchors.fill: parent - border.color: creatorTheme.QmlDesignerBackgroundColorDarker - color: control.pressed - ? creatorTheme.QmlDesignerBackgroundColorLighter - : creatorTheme.FancyToolButtonHoverColor + border.color: creatorTheme.QmlDesignerBorderColor + color: creatorTheme.QmlDesignerBackgroundColorDarker opacity: control.hovered || control.pressed ? 1 : 0.75 } Image { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/RoundedPanel.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/RoundedPanel.qml index ca9f423307..2389de12f1 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/RoundedPanel.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/RoundedPanel.qml @@ -30,8 +30,8 @@ import QtQuick.Layouts 1.0 Rectangle { id: panel - property bool roundLeft: false - property bool roundRight: false + property bool roundLeft: true + property bool roundRight: true /* @@ -43,8 +43,8 @@ Rectangle { */ border.width: roundLeft || roundRight ? 1 : 0 - color: creatorTheme.BackgroundColorDark - border.color: creatorTheme.QmlDesignerBackgroundColorDarker + color: creatorTheme.QmlDesignerButtonColor + border.color: creatorTheme.QmlDesignerBorderColor Rectangle { anchors.fill: parent @@ -71,7 +71,7 @@ Rectangle { } Rectangle { - color: creatorTheme.QmlDesignerBackgroundColorDarker + color: creatorTheme.QmlDesignerBorderColor anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right @@ -81,7 +81,7 @@ Rectangle { } Rectangle { - color: creatorTheme.QmlDesignerBackgroundColorDarker + color: creatorTheme.QmlDesignerBorderColor anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: parent.right diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/SpinBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/SpinBox.qml index 08ac2a0157..2a07b05817 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/SpinBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/SpinBox.qml @@ -35,7 +35,7 @@ Controls.SpinBox { ExtendedFunctionButton { x: 2 - y: 4 + anchors.verticalCenter: parent.verticalCenter backendValue: spinBox.backendValue visible: spinBox.enabled } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentbottom-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentbottom-h-icon.png Binary files differdeleted file mode 100644 index 6ebf5b67d4..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentbottom-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentbottom-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentbottom-icon.png Binary files differdeleted file mode 100644 index 99344eb305..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentbottom-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentcenterh-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentcenterh-h-icon.png Binary files differdeleted file mode 100644 index 2f31cb90c5..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentcenterh-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentcenterh-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentcenterh-icon.png Binary files differdeleted file mode 100644 index 30279b6907..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentcenterh-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentleft-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentleft-h-icon.png Binary files differdeleted file mode 100644 index 6f3db311ed..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentleft-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentleft-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentleft-icon.png Binary files differdeleted file mode 100644 index 9cb8bef8ab..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentleft-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentmiddle-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentmiddle-h-icon.png Binary files differdeleted file mode 100644 index 7b54c5b676..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentmiddle-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentmiddle-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentmiddle-icon.png Binary files differdeleted file mode 100644 index 670a195d55..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentmiddle-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentright-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentright-h-icon.png Binary files differdeleted file mode 100644 index 8ddd089e33..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentright-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentright-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentright-icon.png Binary files differdeleted file mode 100644 index f97d371d6a..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmentright-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmenttop-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmenttop-h-icon.png Binary files differdeleted file mode 100644 index 207bedbc1a..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmenttop-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmenttop-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmenttop-icon.png Binary files differdeleted file mode 100644 index 1d3bb8ec72..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/alignmenttop-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-bottom.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-bottom.png Binary files differdeleted file mode 100644 index e3fe210293..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-bottom.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-fill.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-fill.png Binary files differdeleted file mode 100644 index 5416866937..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-fill.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-horizontal.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-horizontal.png Binary files differdeleted file mode 100644 index 8a9075a676..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-horizontal.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-left.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-left.png Binary files differdeleted file mode 100644 index 3d3df4048c..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-left.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-right.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-right.png Binary files differdeleted file mode 100644 index b0a20b110b..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-right.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-top.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-top.png Binary files differdeleted file mode 100644 index 4220e37a2d..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-top.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-vertical.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-vertical.png Binary files differdeleted file mode 100644 index eedb058608..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/anchor-vertical.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/apply.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/apply.png Binary files differdeleted file mode 100644 index 049398256b..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/apply.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/bold-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/bold-h-icon.png Binary files differdeleted file mode 100644 index fc65042bc9..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/bold-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/bold-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/bold-icon.png Binary files differdeleted file mode 100644 index b6db27e081..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/bold-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/cancel.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/cancel.png Binary files differdeleted file mode 100644 index 0f2a8b1194..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/cancel.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/italic-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/italic-h-icon.png Binary files differdeleted file mode 100644 index 91ba0067fe..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/italic-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/italic-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/italic-icon.png Binary files differdeleted file mode 100644 index 20e3e37977..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/italic-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/strikeout-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/strikeout-h-icon.png Binary files differdeleted file mode 100644 index 523ca7b389..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/strikeout-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/strikeout-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/strikeout-icon.png Binary files differdeleted file mode 100644 index 70ce08597c..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/strikeout-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/underline-h-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/underline-h-icon.png Binary files differdeleted file mode 100644 index a6697339d1..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/underline-h-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/underline-icon.png b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/underline-icon.png Binary files differdeleted file mode 100644 index d8439905b6..0000000000 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/images/underline-icon.png +++ /dev/null diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml index 75e815098c..2e2446a03b 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnchorRow.qml @@ -128,7 +128,7 @@ RowLayout { exclusive: true ButtonRowButton { - iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-top.png" : "../HelperWidgets/images/anchor-left.png" + iconSource: "image://icons/anchor-" + (verticalAnchor ? "top" : "left") tooltip: verticalAnchor ? qsTr("Anchor to the top of the target.") : qsTr("Anchor to the left of the target.") onClicked: { if (!invertRelativeTargets) @@ -139,14 +139,14 @@ RowLayout { } ButtonRowButton { - iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-vertical.png" : "../HelperWidgets/images/anchor-horizontal.png" + iconSource: "image://icons/anchor-" + (verticalAnchor ? "vertical" : "horizontal") tooltip: verticalAnchor ? qsTr("Anchor to the vertical center of the target.") : qsTr("Anchor to the horizontal center of the target.") onClicked: centerButtonClicked(); } ButtonRowButton { - iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-bottom.png" : "../HelperWidgets/images/anchor-right.png" + iconSource: "image://icons/anchor-" + (verticalAnchor ? "bottom" : "right") tooltip: verticalAnchor ? qsTr("Anchor to the bottom of the target.") : qsTr("Anchor to the right of the target.") onClicked: { if (!invertRelativeTargets) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutSection.qml index 6ae989f67e..f211a4b37f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/LayoutSection.qml @@ -50,7 +50,7 @@ Section { AnchorRow { visible: anchorBackend.topAnchored; - iconSource: "../HelperWidgets/images/anchor-top.png" + iconSource: "image://icons/anchor-top" anchorMargin: backendValues.anchors_topMargin targetName: anchorBackend.topTarget onTargetChanged: { @@ -73,7 +73,7 @@ Section { AnchorRow { visible: anchorBackend.bottomAnchored; - iconSource: "../HelperWidgets/images/anchor-bottom.png" + iconSource: "image://icons/anchor-bottom" anchorMargin: backendValues.anchors_bottomMargin targetName: anchorBackend.bottomTarget onTargetChanged: { @@ -97,7 +97,7 @@ Section { AnchorRow { visible: anchorBackend.leftAnchored; - iconSource: "../HelperWidgets/images/anchor-left.png" + iconSource: "image://icons/anchor-left" anchorMargin: backendValues.anchors_leftMargin targetName: anchorBackend.leftTarget onTargetChanged: { @@ -120,7 +120,7 @@ Section { AnchorRow { visible: anchorBackend.rightAnchored; - iconSource: "../HelperWidgets/images/anchor-right.png" + iconSource: "image://icons/anchor-right" anchorMargin: backendValues.anchors_rightMargin targetName: anchorBackend.rightTarget onTargetChanged: { @@ -145,7 +145,7 @@ Section { AnchorRow { showAlternativeTargets: false visible: anchorBackend.horizontalCentered; - iconSource: "../HelperWidgets/images/anchor-horizontal.png" + iconSource: "image://icons/anchor-horizontal" anchorMargin: backendValues.anchors_horizontalCenterOffset targetName: anchorBackend.horizontalTarget onTargetChanged: { @@ -158,7 +158,7 @@ Section { AnchorRow { showAlternativeTargets: false visible: anchorBackend.verticalCentered; - iconSource: "../HelperWidgets/images/anchor-vertical.png" + iconSource: "image://icons/anchor-vertical" anchorMargin: backendValues.anchors_verticalCenterOffset targetName: anchorBackend.verticalTarget onTargetChanged: { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TargetComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TargetComboBox.qml index f9e1d204dd..f96b6304e5 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TargetComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TargetComboBox.qml @@ -31,6 +31,7 @@ import QtQuick.Controls 1.0 as Controls Controls.ComboBox { property string targetName: anchorBackend.topTarget + property color textColor: creatorTheme.PanelTextColorLight id: targetComboBox @@ -50,5 +51,6 @@ Controls.ComboBox { model: anchorBackend.possibleTargetItems style: CustomComboBoxStyle { + textColor: targetComboBox.textColor } } diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml index 6e13ae4934..209b6d478d 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesDelegate.qml @@ -37,6 +37,7 @@ Rectangle { property int delegateStateImageSize color: baseColor + border.color: creatorTheme.QmlDesignerBorderColor MouseArea { anchors.fill: parent @@ -101,9 +102,6 @@ Rectangle { statesEditorModel.renameState(internalNodeId, text) } - // as we change the background we need to change the text - // color to see some text - textColor: creatorTheme.PanelTextColorLight } Item { @@ -120,7 +118,7 @@ Rectangle { anchors.margins: -1 anchors.fill: stateImage border.width: 1 - border.color: "#000000" + border.color: creatorTheme.QmlDesignerBackgroundColorDarker } Image { id: stateImage diff --git a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml index 1f3fca6e10..c9cc82ee32 100644 --- a/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml +++ b/share/qtcreator/qmldesigner/statesEditorQmlSources/StatesList.qml @@ -111,6 +111,7 @@ FocusScope { background: Rectangle { property color buttonBaseColor: Qt.darker(creatorTheme.QmlDesignerBackgroundColorDarkAlternate, 1.1) color: control.hovered ? Qt.lighter(buttonBaseColor, 1.2) : buttonBaseColor + border.color: creatorTheme.QmlDesignerBorderColor border.width: 1 Image { source: "image://icons/plus" @@ -147,7 +148,7 @@ FocusScope { height: delegateHeight isBaseState: 0 == internalNodeId isCurrentState: root.currentStateInternalId == internalNodeId - baseColor: isCurrentState ? Qt.darker(highlightColor, 1.2) : background.color + baseColor: isCurrentState ? creatorTheme.QmlDesigner_HighlightColor : background.color delegateStateName: stateName delegateStateImageSource: stateImageSource delegateStateImageSize: stateImageSize diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index 1a92bb54fb..546827ee1d 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -200,6 +200,8 @@ PaletteWindowTextDisabled=textDisabled PaletteBaseDisabled=backgroundColorDisabled PaletteTextDisabled=textDisabled +QmlDesigner_HighlightColor=ff46a2da + [Flags] ComboBoxDrawTextShadow=false DerivePaletteFromTheme=true @@ -214,6 +216,7 @@ FlatSideBarIcons=true FlatProjectsMode=true FlatMenuBar=true ToolBarIconShadow=true +WindowColorAsBase=false [Gradients] DetailsWidgetHeaderGradient\1\color=0 diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index 712a968555..ceb0f39f43 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -171,6 +171,8 @@ ProjectExplorer_TaskWarn_TextMarkColor=ffffa500 ClangCodeModel_Error_TextMarkColor=ffff882f ClangCodeModel_Warning_TextMarkColor=ffc6c132 +QmlDesigner_HighlightColor=ff46a2da + [Flags] ComboBoxDrawTextShadow=true DerivePaletteFromTheme=false @@ -185,6 +187,7 @@ FlatSideBarIcons=false FlatProjectsMode=false FlatMenuBar=false ToolBarIconShadow=true +WindowColorAsBase=false [Gradients] DetailsWidgetHeaderGradient\1\color=ffffff diff --git a/share/qtcreator/themes/flat-dark.creatortheme b/share/qtcreator/themes/flat-dark.creatortheme index bf2b98e834..5469e2d1d3 100644 --- a/share/qtcreator/themes/flat-dark.creatortheme +++ b/share/qtcreator/themes/flat-dark.creatortheme @@ -105,7 +105,7 @@ MenuItemTextColorNormal=text MiniProjectTargetSelectorBackgroundColor=shadowBackground MiniProjectTargetSelectorBorderColor=shadowBackground MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground -MiniProjectTargetSelectorTextColor=text +MiniProjectTargetSelectorTextColor=fancyBarsNormalTextColor PanelStatusBarBackgroundColor=shadowBackground PanelsWidgetSeparatorLineColor=0 PanelTextColorDark=text @@ -185,6 +185,8 @@ ProjectExplorer_TaskWarn_TextMarkColor=ffffff40 ClangCodeModel_Error_TextMarkColor=ffff882f ClangCodeModel_Warning_TextMarkColor=ffceff40 +QmlDesigner_HighlightColor=ff46a2da + PaletteWindow=normalBackground PaletteWindowText=text PaletteBase=normalBackground @@ -219,6 +221,7 @@ FlatSideBarIcons=true FlatProjectsMode=true FlatMenuBar=true ToolBarIconShadow=true +WindowColorAsBase=false [Gradients] DetailsWidgetHeaderGradient\1\color=0 diff --git a/share/qtcreator/themes/flat-light.creatortheme b/share/qtcreator/themes/flat-light.creatortheme index 24e47e1999..ef550cc010 100644 --- a/share/qtcreator/themes/flat-light.creatortheme +++ b/share/qtcreator/themes/flat-light.creatortheme @@ -102,7 +102,7 @@ MenuItemTextColorNormal=text MiniProjectTargetSelectorBackgroundColor=shadowBackground MiniProjectTargetSelectorBorderColor=shadowBackground MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground -MiniProjectTargetSelectorTextColor=text +MiniProjectTargetSelectorTextColor=fancyBarsNormalTextColor PanelStatusBarBackgroundColor=shadowBackground PanelsWidgetSeparatorLineColor=0 PanelTextColorDark=text @@ -182,6 +182,8 @@ ProjectExplorer_TaskWarn_TextMarkColor=ffffa500 ClangCodeModel_Error_TextMarkColor=ffff882f ClangCodeModel_Warning_TextMarkColor=ffc6c132 +QmlDesigner_HighlightColor=ff46a2da + [Flags] ComboBoxDrawTextShadow=false DerivePaletteFromTheme=false @@ -196,6 +198,7 @@ FlatSideBarIcons=true FlatProjectsMode=false FlatMenuBar=false ToolBarIconShadow=false +WindowColorAsBase=false [Gradients] DetailsWidgetHeaderGradient\1\color=0 diff --git a/share/qtcreator/themes/flat.creatortheme b/share/qtcreator/themes/flat.creatortheme index 84850bed9c..51fd6df5aa 100644 --- a/share/qtcreator/themes/flat.creatortheme +++ b/share/qtcreator/themes/flat.creatortheme @@ -101,7 +101,7 @@ MenuItemTextColorNormal=text MiniProjectTargetSelectorBackgroundColor=shadowBackground MiniProjectTargetSelectorBorderColor=shadowBackground MiniProjectTargetSelectorSummaryBackgroundColor=shadowBackground -MiniProjectTargetSelectorTextColor=text +MiniProjectTargetSelectorTextColor=fancyBarsNormalTextColor PanelStatusBarBackgroundColor=shadowBackground PanelsWidgetSeparatorLineColor=0 PanelTextColorDark=text @@ -181,6 +181,8 @@ ProjectExplorer_TaskWarn_TextMarkColor=ffffa500 ClangCodeModel_Error_TextMarkColor=ffff882f ClangCodeModel_Warning_TextMarkColor=ffc6c132 +QmlDesigner_HighlightColor=ff46a2da + [Flags] ComboBoxDrawTextShadow=false DerivePaletteFromTheme=false @@ -195,6 +197,7 @@ FlatSideBarIcons=true FlatProjectsMode=false FlatMenuBar=false ToolBarIconShadow=true +WindowColorAsBase=false [Gradients] DetailsWidgetHeaderGradient\1\color=0 diff --git a/share/share.qbs b/share/share.qbs index df3e418bf4..08688ec092 100644 --- a/share/share.qbs +++ b/share/share.qbs @@ -55,7 +55,7 @@ Product { ] if (qbs.targetOS.contains("windows")) list.push("notepad_win.xml"); - else if (qbs.targetOS.contains("osx")) + else if (qbs.targetOS.contains("macos")) list.push("vi_mac.xml"); else list.push("vi.xml"); diff --git a/src/app/app.qbs b/src/app/app.qbs index db720637db..2eac52ac64 100644 --- a/src/app/app.qbs +++ b/src/app/app.qbs @@ -2,10 +2,10 @@ import qbs QtcProduct { Depends { name: "bundle" } - Depends { name: "ib"; condition: qbs.targetOS.contains("osx") } + Depends { name: "ib"; condition: qbs.targetOS.contains("macos") } Properties { - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") ib.appIconName: "qtcreator" } @@ -23,7 +23,7 @@ QtcProduct { installDir: qtc.ide_bin_path property bool qtcRunnable: true - cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/../Frameworks"] + cpp.rpaths: qbs.targetOS.contains("macos") ? ["@executable_path/../Frameworks"] : ["$ORIGIN/../" + qtc.libDirName + "/qtcreator"] cpp.includePaths: [ project.sharedSourcesDir + "/qtsingleapplication", @@ -51,7 +51,7 @@ QtcProduct { Group { name: "qtcreator.sh" - condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos") files: "../../bin/qtcreator.sh" qbs.install: true qbs.installDir: "bin" @@ -74,7 +74,7 @@ QtcProduct { } Group { - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") fileTagsFilter: ["aggregate_infoplist", "pkginfo", "compiled_assetcatalog"] qbs.install: true qbs.installSourceBase: product.buildDirectory diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index 134fb4d51c..6a414d8b0f 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -762,6 +762,11 @@ QByteArray Preprocessor::run(const QString &fileName, return preprocessed; } +void Preprocessor::setCancelChecker(const Preprocessor::CancelChecker &cancelChecker) +{ + m_cancelChecker = cancelChecker; +} + bool Preprocessor::expandFunctionlikeMacros() const { return m_expandFunctionlikeMacros; @@ -1636,6 +1641,9 @@ void Preprocessor::handlePreprocessorDirective(PPToken *tk) void Preprocessor::handleIncludeDirective(PPToken *tk, bool includeNext) { + if (m_cancelChecker && m_cancelChecker()) + return; + m_state.m_lexer->setScanAngleStringLiteralTokens(true); lex(tk); // consume "include" token m_state.m_lexer->setScanAngleStringLiteralTokens(false); diff --git a/src/libs/cplusplus/pp-engine.h b/src/libs/cplusplus/pp-engine.h index b265de6d46..19935b2c7d 100644 --- a/src/libs/cplusplus/pp-engine.h +++ b/src/libs/cplusplus/pp-engine.h @@ -56,6 +56,8 @@ #include <QByteArray> #include <QPair> +#include <functional> + namespace CPlusPlus { class Environment; @@ -81,6 +83,9 @@ public: QByteArray run(const QString &filename, const QByteArray &source, bool noLines = false, bool markGeneratedTokens = true); + using CancelChecker = std::function<bool()>; + void setCancelChecker(const CancelChecker &cancelChecker); + bool expandFunctionlikeMacros() const; void setExpandFunctionlikeMacros(bool expandFunctionlikeMacros); @@ -253,6 +258,7 @@ private: Client *m_client; Environment *m_env; QByteArray m_scratchBuffer; + CancelChecker m_cancelChecker; bool m_expandFunctionlikeMacros; bool m_keepComments; diff --git a/src/libs/extensionsystem/extensionsystem.pro b/src/libs/extensionsystem/extensionsystem.pro index ec147aec93..dce2b19b17 100644 --- a/src/libs/extensionsystem/extensionsystem.pro +++ b/src/libs/extensionsystem/extensionsystem.pro @@ -37,7 +37,3 @@ FORMS += \ pluginerrorview.ui \ plugindetailsview.ui \ pluginerroroverview.ui -RESOURCES += pluginview.qrc - - - diff --git a/src/libs/extensionsystem/extensionsystem.qbs b/src/libs/extensionsystem/extensionsystem.qbs index 003c591e7b..62c5b26ed5 100644 --- a/src/libs/extensionsystem/extensionsystem.qbs +++ b/src/libs/extensionsystem/extensionsystem.qbs @@ -43,10 +43,6 @@ Project { "pluginspec_p.h", "pluginview.cpp", "pluginview.h", - "pluginview.qrc", - "images/error.png", - "images/notloaded.png", - "images/ok.png", ] Export { diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index e26863265e..63d9840853 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -1024,6 +1024,8 @@ static int executeTestPlan(const TestPlan &testPlan) << QLatin1String("arg0") // fake application name << QLatin1String("-maxwarnings") << QLatin1String("0"); // unlimit output qExecArguments << functions; + // avoid being stuck in QTBUG-24925 + qExecArguments << "-nocrashhandler"; failedTests += QTest::qExec(testObject, qExecArguments); } diff --git a/src/libs/extensionsystem/pluginview.cpp b/src/libs/extensionsystem/pluginview.cpp index 9a6adf03c8..1de716af1e 100644 --- a/src/libs/extensionsystem/pluginview.cpp +++ b/src/libs/extensionsystem/pluginview.cpp @@ -31,7 +31,7 @@ #include <utils/algorithm.h> #include <utils/categorysortfiltermodel.h> -#include <utils/icon.h> +#include <utils/utilsicons.h> #include <utils/itemviews.h> #include <utils/qtcassert.h> #include <utils/treemodel.h> @@ -90,22 +90,16 @@ static const QIcon &icon(IconIndex icon) using namespace Utils; switch (icon) { case OkIcon: { - static const QIcon ok = - Icon({{QLatin1String(":/extensionsystem/images/ok.png"), - Theme::IconsRunToolBarColor}}, Icon::Tint).icon(); + static const QIcon ok = Utils::Icons::OK.icon(); return ok; } case ErrorIcon: { - static const QIcon error = - Icon({{QLatin1String(":/extensionsystem/images/error.png"), - Theme::IconsErrorColor}}, Icon::Tint).icon(); + static const QIcon error = Utils::Icons::ERROR.icon(); return error; } default: case NotLoadedIcon: { - static const QIcon notLoaded = - Icon({{QLatin1String(":/extensionsystem/images/notloaded.png"), - Theme::IconsErrorColor}}, Icon::Tint).icon(); + static const QIcon notLoaded = Utils::Icons::NOTLOADED.icon(); return notLoaded; } } diff --git a/src/libs/extensionsystem/pluginview.qrc b/src/libs/extensionsystem/pluginview.qrc deleted file mode 100644 index da218976eb..0000000000 --- a/src/libs/extensionsystem/pluginview.qrc +++ /dev/null @@ -1,10 +0,0 @@ -<RCC> - <qresource prefix="/extensionsystem"> - <file>images/ok.png</file> - <file>images/ok@2x.png</file> - <file>images/error.png</file> - <file>images/error@2x.png</file> - <file>images/notloaded.png</file> - <file>images/notloaded@2x.png</file> - </qresource> -</RCC> diff --git a/src/libs/qmleditorwidgets/images/alignment_bottom.png b/src/libs/qmleditorwidgets/images/alignment_bottom.png Binary files differnew file mode 100644 index 0000000000..71c641633a --- /dev/null +++ b/src/libs/qmleditorwidgets/images/alignment_bottom.png diff --git a/src/libs/qmleditorwidgets/images/alignment_center.png b/src/libs/qmleditorwidgets/images/alignment_center.png Binary files differnew file mode 100644 index 0000000000..a27ce588c7 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/alignment_center.png diff --git a/src/libs/qmleditorwidgets/images/alignment_left.png b/src/libs/qmleditorwidgets/images/alignment_left.png Binary files differnew file mode 100644 index 0000000000..823ac2348c --- /dev/null +++ b/src/libs/qmleditorwidgets/images/alignment_left.png diff --git a/src/libs/qmleditorwidgets/images/alignment_middle.png b/src/libs/qmleditorwidgets/images/alignment_middle.png Binary files differnew file mode 100644 index 0000000000..ea39e222a7 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/alignment_middle.png diff --git a/src/libs/qmleditorwidgets/images/alignment_right.png b/src/libs/qmleditorwidgets/images/alignment_right.png Binary files differnew file mode 100644 index 0000000000..4e6555a356 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/alignment_right.png diff --git a/src/libs/qmleditorwidgets/images/alignment_top.png b/src/libs/qmleditorwidgets/images/alignment_top.png Binary files differnew file mode 100644 index 0000000000..2d692a766b --- /dev/null +++ b/src/libs/qmleditorwidgets/images/alignment_top.png diff --git a/src/libs/qmleditorwidgets/images/anchor_bottom.png b/src/libs/qmleditorwidgets/images/anchor_bottom.png Binary files differnew file mode 100644 index 0000000000..fba3a6c836 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_bottom.png diff --git a/src/libs/qmleditorwidgets/images/anchor_bottom@2x.png b/src/libs/qmleditorwidgets/images/anchor_bottom@2x.png Binary files differnew file mode 100644 index 0000000000..4179d20e1d --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_bottom@2x.png diff --git a/src/libs/qmleditorwidgets/images/anchor_fill.png b/src/libs/qmleditorwidgets/images/anchor_fill.png Binary files differnew file mode 100644 index 0000000000..7109ee5e54 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_fill.png diff --git a/src/libs/qmleditorwidgets/images/anchor_fill@2x.png b/src/libs/qmleditorwidgets/images/anchor_fill@2x.png Binary files differnew file mode 100644 index 0000000000..54c498fdca --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_fill@2x.png diff --git a/src/libs/qmleditorwidgets/images/anchor_horizontal.png b/src/libs/qmleditorwidgets/images/anchor_horizontal.png Binary files differnew file mode 100644 index 0000000000..851d7896dc --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_horizontal.png diff --git a/src/libs/qmleditorwidgets/images/anchor_horizontal@2x.png b/src/libs/qmleditorwidgets/images/anchor_horizontal@2x.png Binary files differnew file mode 100644 index 0000000000..fec1461b01 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_horizontal@2x.png diff --git a/src/libs/qmleditorwidgets/images/anchor_left.png b/src/libs/qmleditorwidgets/images/anchor_left.png Binary files differnew file mode 100644 index 0000000000..0e5ec07b57 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_left.png diff --git a/src/libs/qmleditorwidgets/images/anchor_left@2x.png b/src/libs/qmleditorwidgets/images/anchor_left@2x.png Binary files differnew file mode 100644 index 0000000000..adab9b03fe --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_left@2x.png diff --git a/src/libs/qmleditorwidgets/images/anchor_right.png b/src/libs/qmleditorwidgets/images/anchor_right.png Binary files differnew file mode 100644 index 0000000000..97f9a70469 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_right.png diff --git a/src/libs/qmleditorwidgets/images/anchor_right@2x.png b/src/libs/qmleditorwidgets/images/anchor_right@2x.png Binary files differnew file mode 100644 index 0000000000..583b3df22b --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_right@2x.png diff --git a/src/libs/qmleditorwidgets/images/anchor_top.png b/src/libs/qmleditorwidgets/images/anchor_top.png Binary files differnew file mode 100644 index 0000000000..37b0fcadc9 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_top.png diff --git a/src/libs/qmleditorwidgets/images/anchor_top@2x.png b/src/libs/qmleditorwidgets/images/anchor_top@2x.png Binary files differnew file mode 100644 index 0000000000..3253a42bcc --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_top@2x.png diff --git a/src/libs/qmleditorwidgets/images/anchor_vertical.png b/src/libs/qmleditorwidgets/images/anchor_vertical.png Binary files differnew file mode 100644 index 0000000000..3c092755f3 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_vertical.png diff --git a/src/libs/qmleditorwidgets/images/anchor_vertical@2x.png b/src/libs/qmleditorwidgets/images/anchor_vertical@2x.png Binary files differnew file mode 100644 index 0000000000..ed661f1a72 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchor_vertical@2x.png diff --git a/src/libs/qmleditorwidgets/images/anchoreditem.png b/src/libs/qmleditorwidgets/images/anchoreditem.png Binary files differnew file mode 100644 index 0000000000..5293d5e9b1 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchoreditem.png diff --git a/src/libs/qmleditorwidgets/images/anchoreditem@2x.png b/src/libs/qmleditorwidgets/images/anchoreditem@2x.png Binary files differnew file mode 100644 index 0000000000..ded9e69bd4 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/anchoreditem@2x.png diff --git a/src/libs/qmleditorwidgets/images/style_bold.png b/src/libs/qmleditorwidgets/images/style_bold.png Binary files differnew file mode 100644 index 0000000000..75632cc838 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/style_bold.png diff --git a/src/libs/qmleditorwidgets/images/style_bold@2x.png b/src/libs/qmleditorwidgets/images/style_bold@2x.png Binary files differnew file mode 100644 index 0000000000..3ddf0c0db6 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/style_bold@2x.png diff --git a/src/libs/qmleditorwidgets/images/style_italic.png b/src/libs/qmleditorwidgets/images/style_italic.png Binary files differnew file mode 100644 index 0000000000..5c421dbca4 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/style_italic.png diff --git a/src/libs/qmleditorwidgets/images/style_italic@2x.png b/src/libs/qmleditorwidgets/images/style_italic@2x.png Binary files differnew file mode 100644 index 0000000000..cbbeb26349 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/style_italic@2x.png diff --git a/src/libs/qmleditorwidgets/images/style_strikeout.png b/src/libs/qmleditorwidgets/images/style_strikeout.png Binary files differnew file mode 100644 index 0000000000..097aea8c1b --- /dev/null +++ b/src/libs/qmleditorwidgets/images/style_strikeout.png diff --git a/src/libs/qmleditorwidgets/images/style_strikeout@2x.png b/src/libs/qmleditorwidgets/images/style_strikeout@2x.png Binary files differnew file mode 100644 index 0000000000..573c867e6d --- /dev/null +++ b/src/libs/qmleditorwidgets/images/style_strikeout@2x.png diff --git a/src/libs/qmleditorwidgets/images/style_underline.png b/src/libs/qmleditorwidgets/images/style_underline.png Binary files differnew file mode 100644 index 0000000000..2aaa067427 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/style_underline.png diff --git a/src/libs/qmleditorwidgets/images/style_underline@2x.png b/src/libs/qmleditorwidgets/images/style_underline@2x.png Binary files differnew file mode 100644 index 0000000000..96a32ef897 --- /dev/null +++ b/src/libs/qmleditorwidgets/images/style_underline@2x.png diff --git a/src/libs/qmleditorwidgets/resources.qrc b/src/libs/qmleditorwidgets/resources.qrc index f43e57dd28..5c7164c7b8 100644 --- a/src/libs/qmleditorwidgets/resources.qrc +++ b/src/libs/qmleditorwidgets/resources.qrc @@ -39,5 +39,35 @@ <file>images/tile-icon-hor-crop.png</file> <file>images/tile-icon-hor - scale.png</file> <file>images/tile-icon-vert-scale.png</file> + <file>images/anchor_bottom.png</file> + <file>images/anchor_bottom@2x.png</file> + <file>images/anchor_fill.png</file> + <file>images/anchor_fill@2x.png</file> + <file>images/anchor_horizontal.png</file> + <file>images/anchor_horizontal@2x.png</file> + <file>images/anchor_left.png</file> + <file>images/anchor_left@2x.png</file> + <file>images/anchor_right.png</file> + <file>images/anchor_right@2x.png</file> + <file>images/anchor_top.png</file> + <file>images/anchor_top@2x.png</file> + <file>images/anchor_vertical.png</file> + <file>images/anchor_vertical@2x.png</file> + <file>images/anchoreditem.png</file> + <file>images/anchoreditem@2x.png</file> + <file>images/alignment_center.png</file> + <file>images/alignment_left.png</file> + <file>images/alignment_right.png</file> + <file>images/alignment_bottom.png</file> + <file>images/alignment_middle.png</file> + <file>images/alignment_top.png</file> + <file>images/style_bold.png</file> + <file>images/style_bold@2x.png</file> + <file>images/style_italic.png</file> + <file>images/style_italic@2x.png</file> + <file>images/style_underline.png</file> + <file>images/style_underline@2x.png</file> + <file>images/style_strikeout.png</file> + <file>images/style_strikeout@2x.png</file> </qresource> </RCC> diff --git a/src/libs/qmljs/qmljsfindexportedcpptypes.cpp b/src/libs/qmljs/qmljsfindexportedcpptypes.cpp index ff82a56cd5..e1c4d55de7 100644 --- a/src/libs/qmljs/qmljsfindexportedcpptypes.cpp +++ b/src/libs/qmljs/qmljsfindexportedcpptypes.cpp @@ -31,6 +31,7 @@ #include <cplusplus/TypeOfExpression.h> #include <cplusplus/cppmodelmanagerbase.h> #include <cplusplus/CppDocument.h> +#include <utils/qtcassert.h> #include <QList> @@ -819,6 +820,8 @@ FindExportedCppTypes::FindExportedCppTypes(const CPlusPlus::Snapshot &snapshot) QStringList FindExportedCppTypes::operator()(const CPlusPlus::Document::Ptr &document) { + QTC_ASSERT(!document.isNull(), return QStringList()); + m_contextProperties.clear(); m_exportedTypes.clear(); QStringList fileNames; diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp index a919087fea..bdd6e6eeab 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp @@ -1321,7 +1321,10 @@ void ModelManagerInterface::updateCppQmlTypes(QFutureInterface<void> &interface, if (!scan) { hasNewInfo = newData.remove(fileName) > 0 || hasNewInfo; foreach (const QString &file, newDeclarations[fileName]) { - finder(snapshot.document(file)); + CPlusPlus::Document::Ptr doc = snapshot.document(file); + if (doc.isNull()) + continue; + finder(doc); hasNewInfo = rescanExports(file, finder, newData) || hasNewInfo; } continue; diff --git a/src/libs/ssh/ssh.qbs b/src/libs/ssh/ssh.qbs index e3ef0cf3f5..c79dacb79f 100644 --- a/src/libs/ssh/ssh.qbs +++ b/src/libs/ssh/ssh.qbs @@ -69,7 +69,7 @@ Project { result.push("advapi32", "user32") else if (qbs.targetOS.contains("linux")) result.push("rt", "dl"); - else if (qbs.targetOS.contains("osx")) + else if (qbs.targetOS.contains("macos")) result.push("dl"); else if (qbs.targetOS.contains("unix")) result.push("rt"); @@ -95,7 +95,7 @@ Project { "BOTAN_HAS_ALLOC_MMAP", "BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM", "BOTAN_HAS_ENTROPY_SRC_EGD", "BOTAN_HAS_ENTROPY_SRC_FTW", "BOTAN_HAS_ENTROPY_SRC_UNIX", "BOTAN_HAS_MUTEX_PTHREAD", "BOTAN_HAS_PIPE_UNIXFD_IO") - if (qbs.targetOS.contains("osx")) + if (qbs.targetOS.contains("macos")) result.push("BOTAN_TARGET_OS_IS_DARWIN", "BOTAN_TARGET_OS_HAS_GETTIMEOFDAY", "BOTAN_HAS_ALLOC_MMAP", "BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM", "BOTAN_HAS_ENTROPY_SRC_EGD", "BOTAN_HAS_ENTROPY_SRC_FTW", diff --git a/src/libs/extensionsystem/images/error.png b/src/libs/utils/images/error.png Binary files differindex 3afb9548f6..3afb9548f6 100644 --- a/src/libs/extensionsystem/images/error.png +++ b/src/libs/utils/images/error.png diff --git a/src/libs/extensionsystem/images/error@2x.png b/src/libs/utils/images/error@2x.png Binary files differindex af6c94483e..af6c94483e 100644 --- a/src/libs/extensionsystem/images/error@2x.png +++ b/src/libs/utils/images/error@2x.png diff --git a/src/libs/extensionsystem/images/notloaded.png b/src/libs/utils/images/notloaded.png Binary files differindex 16de272cae..16de272cae 100644 --- a/src/libs/extensionsystem/images/notloaded.png +++ b/src/libs/utils/images/notloaded.png diff --git a/src/libs/extensionsystem/images/notloaded@2x.png b/src/libs/utils/images/notloaded@2x.png Binary files differindex 902bf624cd..902bf624cd 100644 --- a/src/libs/extensionsystem/images/notloaded@2x.png +++ b/src/libs/utils/images/notloaded@2x.png diff --git a/src/libs/extensionsystem/images/ok.png b/src/libs/utils/images/ok.png Binary files differindex 13d8dfaae2..13d8dfaae2 100644 --- a/src/libs/extensionsystem/images/ok.png +++ b/src/libs/utils/images/ok.png diff --git a/src/libs/extensionsystem/images/ok@2x.png b/src/libs/utils/images/ok@2x.png Binary files differindex 7dc3295fed..7dc3295fed 100644 --- a/src/libs/extensionsystem/images/ok@2x.png +++ b/src/libs/utils/images/ok@2x.png diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index edf0384f2d..0e1d838e3c 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -30,6 +30,7 @@ #include "synchronousprocess.h" #include "hostosinfo.h" +#include "theme/theme.h" #include <QDebug> #include <QFileDialog> @@ -226,6 +227,7 @@ PathChooser::PathChooser(QWidget *parent) : connect(d->m_lineEdit, &QLineEdit::textChanged, this, [this] { emit pathChanged(path()); }); d->m_lineEdit->setMinimumWidth(120); + d->m_lineEdit->setErrorColor(creatorTheme()->color(Theme::TextColorError)); d->m_hLayout->addWidget(d->m_lineEdit); d->m_hLayout->setSizeConstraint(QLayout::SetMinimumSize); diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index 1dfe1d89dd..088b7ff515 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -66,14 +66,14 @@ QColor StyleHelper::mergedColors(const QColor &colorA, const QColor &colorB, int QColor StyleHelper::alphaBlendedColors(const QColor &colorA, const QColor &colorB) { - const QRgb base = colorA.rgba(); - const QRgb overlay = colorB.rgba(); - const qreal overlayIntensity = qAlpha(overlay) / 255.0; - return qRgba( - qMin(qRed(base) + qRound(qRed(overlay) * overlayIntensity), 0xff), - qMin(qGreen(base) + qRound(qGreen(overlay) * overlayIntensity), 0xff), - qMin(qBlue(base) + qRound(qBlue(overlay) * overlayIntensity), 0xff), - qMin(qAlpha(base) + qAlpha(overlay), 0xff)); + const int alpha = colorB.alpha(); + const int antiAlpha = 255 - alpha; + + return QColor( + (colorA.red() * antiAlpha + colorB.red() * alpha) / 255, + (colorA.green() * antiAlpha + colorB.green() * alpha) / 255, + (colorA.blue() * antiAlpha + colorB.blue() * alpha) / 255 + ); } qreal StyleHelper::sidebarFontSize() @@ -114,6 +114,12 @@ QColor StyleHelper::m_requestedBaseColor; QColor StyleHelper::baseColor(bool lightColored) { + static const bool windowColorAsBase = creatorTheme()->flag(Theme::WindowColorAsBase); + if (windowColorAsBase) { + static const QColor windowColor = QApplication::palette().color(QPalette::Window); + return windowColor; + } + if (!lightColored) return m_baseColor; else diff --git a/src/libs/utils/theme/theme.h b/src/libs/utils/theme/theme.h index 9358f11d28..dd2eac9a0d 100644 --- a/src/libs/utils/theme/theme.h +++ b/src/libs/utils/theme/theme.h @@ -279,7 +279,10 @@ public: /* ClangCodeModel Plugin */ ClangCodeModel_Error_TextMarkColor, - ClangCodeModel_Warning_TextMarkColor + ClangCodeModel_Warning_TextMarkColor, + + /* QmlDesigner */ + QmlDesigner_HighlightColor }; enum Gradient { @@ -323,7 +326,8 @@ public: FlatSideBarIcons, FlatProjectsMode, FlatMenuBar, - ToolBarIconShadow + ToolBarIconShadow, + WindowColorAsBase }; bool flag(Flag f) const; diff --git a/src/libs/utils/tooltip/tooltip.cpp b/src/libs/utils/tooltip/tooltip.cpp index 7617403c81..9fdca7b7e8 100644 --- a/src/libs/utils/tooltip/tooltip.cpp +++ b/src/libs/utils/tooltip/tooltip.cpp @@ -28,6 +28,7 @@ #include "effects.h" #include "reuse.h" +#include <utils/faketooltip.h> #include <utils/hostosinfo.h> #include <utils/qtcassert.h> @@ -85,6 +86,17 @@ void ToolTip::show(const QPoint &pos, QWidget *content, QWidget *w, const QStrin instance()->showInternal(pos, QVariant::fromValue(content), WidgetContent, w, helpId, rect); } +void ToolTip::show(const QPoint &pos, QLayout *content, QWidget *w, const QString &helpId, const QRect &rect) +{ + if (content && content->count()) { + auto tooltipWidget = new FakeToolTip; + tooltipWidget->setLayout(content); + instance()->showInternal(pos, QVariant::fromValue(tooltipWidget), WidgetContent, w, helpId, rect); + } else { + instance()->hideTipWithDelay(); + } +} + void ToolTip::move(const QPoint &pos, QWidget *w) { if (isVisible()) diff --git a/src/libs/utils/tooltip/tooltip.h b/src/libs/utils/tooltip/tooltip.h index 03d4452773..4478281519 100644 --- a/src/libs/utils/tooltip/tooltip.h +++ b/src/libs/utils/tooltip/tooltip.h @@ -45,6 +45,7 @@ QT_BEGIN_NAMESPACE class QPoint; class QVariant; +class QLayout; class QWidget; QT_END_NAMESPACE @@ -76,6 +77,8 @@ public: const QString &helpId = QString(), const QRect &rect = QRect()); static void show(const QPoint &pos, QWidget *content, QWidget *w = 0, const QString &helpId = QString(), const QRect &rect = QRect()); + static void show(const QPoint &pos, QLayout *content, QWidget *w = 0, + const QString &helpId = QString(), const QRect &rect = QRect()); static void move(const QPoint &pos, QWidget *w); static void hide(); static void hideImmediately(); diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs index dc5e7b71e9..8b41c2f602 100644 --- a/src/libs/utils/utils.qbs +++ b/src/libs/utils/utils.qbs @@ -18,7 +18,7 @@ Project { if (qbs.targetOS.contains("windows")) { libs.push("user32", "iphlpapi", "ws2_32", "shell32"); } else if (qbs.targetOS.contains("unix")) { - if (!qbs.targetOS.contains("osx")) + if (!qbs.targetOS.contains("macos")) libs.push("X11"); if (!qbs.targetOS.contains("openbsd")) libs.push("pthread"); @@ -29,7 +29,7 @@ Project { cpp.enableExceptions: true Properties { - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") cpp.frameworks: ["Foundation"] } @@ -278,7 +278,7 @@ Project { Group { name: "FileUtils_osx" - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") files: [ "fileutils_mac.h", "fileutils_mac.mm", ] diff --git a/src/libs/utils/utils.qrc b/src/libs/utils/utils.qrc index 035389c93b..604fda2a06 100644 --- a/src/libs/utils/utils.qrc +++ b/src/libs/utils/utils.qrc @@ -25,5 +25,11 @@ <file>images/locked@2x.png</file> <file>images/unlocked.png</file> <file>images/unlocked@2x.png</file> + <file>images/error.png</file> + <file>images/error@2x.png</file> + <file>images/notloaded.png</file> + <file>images/notloaded@2x.png</file> + <file>images/ok.png</file> + <file>images/ok@2x.png</file> </qresource> </RCC> diff --git a/src/libs/utils/utilsicons.h b/src/libs/utils/utilsicons.h index 601907c2b0..aa74759f9c 100644 --- a/src/libs/utils/utilsicons.h +++ b/src/libs/utils/utilsicons.h @@ -50,6 +50,12 @@ const Utils::Icon ZOOM({ {QLatin1String(":/utils/images/zoom.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint); const Utils::Icon ZOOM_TOOLBAR({ {QLatin1String(":/utils/images/zoom.png"), Utils::Theme::IconsBaseColor}}); +const Utils::Icon OK({ + {QLatin1String(":/utils/images/ok.png"), Utils::Theme::IconsRunToolBarColor}}, Icon::Tint); +const Utils::Icon NOTLOADED({ + {QLatin1String(":/utils/images/notloaded.png"), Utils::Theme::IconsErrorColor}}, Icon::Tint); +const Utils::Icon ERROR({ + {QLatin1String(":/utils/images/error.png"), Utils::Theme::IconsErrorColor}}, Icon::Tint); } // namespace Icons } // namespace Utils diff --git a/src/plugins/android/androidanalyzesupport.cpp b/src/plugins/android/androidanalyzesupport.cpp index e64b839969..0c859c8f19 100644 --- a/src/plugins/android/androidanalyzesupport.cpp +++ b/src/plugins/android/androidanalyzesupport.cpp @@ -72,35 +72,35 @@ AndroidAnalyzeSupport::AndroidAnalyzeSupport(AndroidRunConfiguration *runConfig, auto runner = new AndroidRunner(this, runConfig, runControl->runMode()); - connect(runControl, &AnalyzerRunControl::finished, + connect(runControl, &AnalyzerRunControl::finished, runner, [runner]() { runner->stop(); }); - connect(runControl, &AnalyzerRunControl::starting, + connect(runControl, &AnalyzerRunControl::starting, runner, [runner]() { runner->start(); }); - connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort, + connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort, this, [this, runControl](Utils::Port) { runControl->notifyRemoteSetupDone(m_qmlPort); }); - connect(runner, &AndroidRunner::remoteProcessStarted, + connect(runner, &AndroidRunner::remoteProcessStarted, this, [this](Utils::Port, Utils::Port qmlPort) { m_qmlPort = qmlPort; }); - connect(runner, &AndroidRunner::remoteProcessFinished, + connect(runner, &AndroidRunner::remoteProcessFinished, this, [this, runControl](const QString &errorMsg) { runControl->notifyRemoteFinished(); runControl->appendMessage(errorMsg, Utils::NormalMessageFormat); }); - connect(runner, &AndroidRunner::remoteErrorOutput, + connect(runner, &AndroidRunner::remoteErrorOutput, this, [this, runControl](const QString &msg) { runControl->appendMessage(msg, Utils::StdErrFormatSameLine); m_outputParser.processOutput(msg); }); - connect(runner, &AndroidRunner::remoteOutput, + connect(runner, &AndroidRunner::remoteOutput, this, [this, runControl](const QString &msg) { runControl->appendMessage(msg, Utils::StdOutFormatSameLine); m_outputParser.processOutput(msg); diff --git a/src/plugins/autotest/testconfiguration.cpp b/src/plugins/autotest/testconfiguration.cpp index 0e92789ae3..1082594009 100644 --- a/src/plugins/autotest/testconfiguration.cpp +++ b/src/plugins/autotest/testconfiguration.cpp @@ -151,7 +151,12 @@ void TestConfiguration::completeTestInformation(int runMode) Runnable runnable = rc->runnable(); if (isLocal(rc) && runnable.is<StandardRunnable>()) { StandardRunnable stdRunnable = runnable.as<StandardRunnable>(); - if (stdRunnable.executable == targetFile) { + // we might have an executable that gets installed - in such a case the + // runnable's executable and targetFile won't match - but the (unique) display name + // of the run configuration should match targetName + if (stdRunnable.executable == targetFile + || (!targetName.isEmpty() && rc->displayName() == targetName)) { + targetFile = stdRunnable.executable; workDir = Utils::FileUtils::normalizePathName(stdRunnable.workingDirectory); env = stdRunnable.environment; hasDesktopTarget = true; diff --git a/src/plugins/autotest/testresultspane.cpp b/src/plugins/autotest/testresultspane.cpp index 3571e6c34a..05168391af 100644 --- a/src/plugins/autotest/testresultspane.cpp +++ b/src/plugins/autotest/testresultspane.cpp @@ -517,7 +517,7 @@ void TestResultsPane::updateRunActions() { QString whyNot; TestTreeModel *model = TestTreeModel::instance(); - const bool enable = !model->parser()->isParsing() && model->hasTests() + const bool enable = !m_testRunning && !model->parser()->isParsing() && model->hasTests() && ProjectExplorer::ProjectExplorerPlugin::canRunStartupProject( ProjectExplorer::Constants::NORMAL_RUN_MODE, &whyNot); m_runAll->setEnabled(enable); diff --git a/src/plugins/autotest/testrunner.cpp b/src/plugins/autotest/testrunner.cpp index 4728620536..a85bc750de 100644 --- a/src/plugins/autotest/testrunner.cpp +++ b/src/plugins/autotest/testrunner.cpp @@ -323,6 +323,7 @@ void TestRunner::debugTests() return; } + connect(this, &TestRunner::requestStopTestRun, runControl, &Debugger::DebuggerRunControl::stop); connect(runControl, &Debugger::DebuggerRunControl::finished, this, &TestRunner::onFinished); ProjectExplorer::ProjectExplorerPlugin::startRunControl( runControl, ProjectExplorer::Constants::DEBUG_RUN_MODE); diff --git a/src/plugins/clangcodemodel/clangassistproposalmodel.cpp b/src/plugins/clangcodemodel/clangassistproposalmodel.cpp index 06dc7b3198..c2adf179b7 100644 --- a/src/plugins/clangcodemodel/clangassistproposalmodel.cpp +++ b/src/plugins/clangcodemodel/clangassistproposalmodel.cpp @@ -34,15 +34,22 @@ namespace ClangCodeModel { namespace Internal { +const int SORT_LIMIT = 30000; + ClangAssistProposalModel::ClangAssistProposalModel( ClangBackEnd::CompletionCorrection neededCorrection) : m_neededCorrection(neededCorrection) { } +bool ClangAssistProposalModel::containsDuplicates() const +{ + return false; +} + bool ClangAssistProposalModel::isSortable(const QString &/*prefix*/) const { - return true; + return m_currentItems.size() <= SORT_LIMIT; } void ClangAssistProposalModel::sort(const QString &/*prefix*/) diff --git a/src/plugins/clangcodemodel/clangassistproposalmodel.h b/src/plugins/clangcodemodel/clangassistproposalmodel.h index 32b25bf9d0..6a72214513 100644 --- a/src/plugins/clangcodemodel/clangassistproposalmodel.h +++ b/src/plugins/clangcodemodel/clangassistproposalmodel.h @@ -39,6 +39,8 @@ class ClangAssistProposalModel : public TextEditor::GenericProposalModel public: ClangAssistProposalModel(ClangBackEnd::CompletionCorrection neededCorrection); + bool containsDuplicates() const override; + bool isSortable(const QString &prefix) const override; void sort(const QString &prefix) override; diff --git a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp index 5955d351f0..f979a33af8 100644 --- a/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp +++ b/src/plugins/clangcodemodel/clangcompletionassistprocessor.cpp @@ -91,8 +91,6 @@ QList<AssistProposalItemInterface *> toAssistProposalItems(const CodeCompletions item->addOverload(codeCompletion); } else { item = new ClangAssistProposalItem; - QString detail = CompletionChunksToTextConverter::convertToToolTipWithHtml(codeCompletion.chunks()); - items.insert(name, item); item->setText(name); @@ -138,7 +136,8 @@ using namespace CPlusPlus; using namespace TextEditor; ClangCompletionAssistProcessor::ClangCompletionAssistProcessor() - : m_completionOperator(T_EOF_SYMBOL) + : CppCompletionAssistProcessor(100) + , m_completionOperator(T_EOF_SYMBOL) { } diff --git a/src/plugins/clangcodemodel/clangdiagnosticmanager.cpp b/src/plugins/clangcodemodel/clangdiagnosticmanager.cpp index b57b1e7328..2bfa7baac7 100644 --- a/src/plugins/clangcodemodel/clangdiagnosticmanager.cpp +++ b/src/plugins/clangcodemodel/clangdiagnosticmanager.cpp @@ -345,10 +345,7 @@ void ClangDiagnosticManager::addClangTextMarks( const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics) { for (const ClangBackEnd::DiagnosticContainer &diagnostic : diagnostics) { - auto textMark = new ClangTextMark(filePath(), - diagnostic.location().line(), - diagnostic.severity()); - textMark->setToolTip(diagnostic.text()); + auto textMark = new ClangTextMark(filePath(), diagnostic); m_clangTextMarks.push_back(textMark); m_textDocument->addMark(textMark); } diff --git a/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp b/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp index a810deb5f9..52c097f305 100644 --- a/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp +++ b/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.cpp @@ -186,7 +186,7 @@ public: void addChildrenToLayout(const QString &mainFilePath, const QVector<ClangBackEnd::DiagnosticContainer>::const_iterator first, const QVector<ClangBackEnd::DiagnosticContainer>::const_iterator last, - QBoxLayout &boxLayout) + QLayout &boxLayout) { for (auto it = first; it != last; ++it) boxLayout.addWidget(createDiagnosticLabel(*it, mainFilePath, IndentDiagnostic)); @@ -194,7 +194,7 @@ void addChildrenToLayout(const QString &mainFilePath, void setupChildDiagnostics(const QString &mainFilePath, const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics, - QBoxLayout &boxLayout) + QLayout &boxLayout) { if (diagnostics.size() <= 10) { addChildrenToLayout(mainFilePath, diagnostics.begin(), diagnostics.end(), boxLayout); @@ -214,22 +214,13 @@ void setupChildDiagnostics(const QString &mainFilePath, namespace ClangCodeModel { namespace Internal { -ClangDiagnosticToolTipWidget::ClangDiagnosticToolTipWidget( - const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics, - QWidget *parent) - : Utils::FakeToolTip(parent) +void addToolTipToLayout(const ClangBackEnd::DiagnosticContainer &diagnostic, QLayout *target) { - auto *mainLayout = createLayout<QVBoxLayout>(); + // Set up header and text row for main diagnostic + target->addWidget(new MainDiagnosticWidget(diagnostic)); - foreach (const auto &diagnostic, diagnostics) { - // Set up header and text row for main diagnostic - mainLayout->addWidget(new MainDiagnosticWidget(diagnostic)); - - // Set up child rows for notes - setupChildDiagnostics(diagnostic.location().filePath(), diagnostic.children(), *mainLayout); - } - - setLayout(mainLayout); + // Set up child rows for notes + setupChildDiagnostics(diagnostic.location().filePath(), diagnostic.children(), *target); } } // namespace Internal diff --git a/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.h b/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.h index 4a6777e384..600ccf22d8 100644 --- a/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.h +++ b/src/plugins/clangcodemodel/clangdiagnostictooltipwidget.h @@ -27,19 +27,14 @@ #include <clangbackendipc/diagnosticcontainer.h> -#include <utils/faketooltip.h> +QT_BEGIN_NAMESPACE +class QLayout; +QT_END_NAMESPACE namespace ClangCodeModel { namespace Internal { -class ClangDiagnosticToolTipWidget : public Utils::FakeToolTip -{ - Q_OBJECT -public: - explicit ClangDiagnosticToolTipWidget( - const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics, - QWidget *parent = 0); -}; +void addToolTipToLayout(const ClangBackEnd::DiagnosticContainer &diagnostic, QLayout *target); } // namespace Internal } // namespace ClangCodeModel diff --git a/src/plugins/clangcodemodel/clangeditordocumentparser.cpp b/src/plugins/clangcodemodel/clangeditordocumentparser.cpp index 97939dd92c..129c0669a6 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentparser.cpp +++ b/src/plugins/clangcodemodel/clangeditordocumentparser.cpp @@ -35,7 +35,8 @@ ClangEditorDocumentParser::ClangEditorDocumentParser(const QString &filePath) setConfiguration(config); } -void ClangEditorDocumentParser::updateHelper(const CppTools::WorkingCopy &) +void ClangEditorDocumentParser::updateHelper(const QFutureInterface<void> &, + const CppTools::WorkingCopy &) { State state_ = state(); state_.projectPart = determineProjectPart(filePath(), configuration(), state_); diff --git a/src/plugins/clangcodemodel/clangeditordocumentparser.h b/src/plugins/clangcodemodel/clangeditordocumentparser.h index 65da483e2f..848e31f125 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentparser.h +++ b/src/plugins/clangcodemodel/clangeditordocumentparser.h @@ -37,7 +37,8 @@ public: ClangEditorDocumentParser(const QString &filePath); private: - void updateHelper(const CppTools::WorkingCopy &) override; + void updateHelper(const QFutureInterface<void> &future, + const CppTools::WorkingCopy &) override; }; } // namespace ClangCodeModel diff --git a/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp b/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp index 5b6791f1fe..8a4919e378 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp +++ b/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp @@ -54,7 +54,6 @@ #include <cplusplus/CppDocument.h> #include <utils/qtcassert.h> -#include <utils/tooltip/tooltip.h> #include <utils/runextensions.h> #include <QTextBlock> @@ -244,16 +243,12 @@ bool ClangEditorDocumentProcessor::hasDiagnosticsAt(uint line, uint column) cons return m_diagnosticManager.hasDiagnosticsAt(line, column); } -void ClangEditorDocumentProcessor::showDiagnosticTooltip(const QPoint &point, - QWidget *parent, - uint line, - uint column) const +void ClangEditorDocumentProcessor::addDiagnosticToolTipToLayout(uint line, + uint column, + QLayout *target) const { - const QVector<ClangBackEnd::DiagnosticContainer> diagnostics - = m_diagnosticManager.diagnosticsAt(line, column); - auto *tooltipWidget = new ClangDiagnosticToolTipWidget(diagnostics, parent); - - ::Utils::ToolTip::show(point, tooltipWidget, parent); + foreach (const auto &diagnostic, m_diagnosticManager.diagnosticsAt(line, column)) + addToolTipToLayout(diagnostic, target); } ClangBackEnd::FileContainer ClangEditorDocumentProcessor::fileContainerWithArguments() const diff --git a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h index 31c4f5e9a6..e9ec8ebd18 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h +++ b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h @@ -76,10 +76,7 @@ public: extraRefactoringOperations(const TextEditor::AssistInterface &assistInterface) override; bool hasDiagnosticsAt(uint line, uint column) const override; - void showDiagnosticTooltip(const QPoint &point, - QWidget *parent, - uint line, - uint column) const override; + void addDiagnosticToolTipToLayout(uint line, uint column, QLayout *target) const override; ClangBackEnd::FileContainer fileContainerWithArguments() const; diff --git a/src/plugins/clangcodemodel/clangtextmark.cpp b/src/plugins/clangcodemodel/clangtextmark.cpp index cf5abfb5b6..1021bd0fad 100644 --- a/src/plugins/clangcodemodel/clangtextmark.cpp +++ b/src/plugins/clangcodemodel/clangtextmark.cpp @@ -26,10 +26,12 @@ #include "clangtextmark.h" #include "clangconstants.h" +#include "clangdiagnostictooltipwidget.h" #include <utils/icon.h> #include <utils/theme/theme.h> +#include <QLayout> #include <QString> namespace ClangCodeModel { @@ -57,11 +59,13 @@ Core::Id cartegoryForSeverity(ClangBackEnd::DiagnosticSeverity severity) } // anonymous namespace -ClangTextMark::ClangTextMark(const QString &fileName, int lineNumber, ClangBackEnd::DiagnosticSeverity severity) - : TextEditor::TextMark(fileName, lineNumber, cartegoryForSeverity(severity)) + +ClangTextMark::ClangTextMark(const QString &fileName, const ClangBackEnd::DiagnosticContainer &diagnostic) + : TextEditor::TextMark(fileName, int(diagnostic.location().line()), cartegoryForSeverity(diagnostic.severity())), + m_diagnostic(diagnostic) { setPriority(TextEditor::TextMark::HighPriority); - setIcon(severity); + setIcon(diagnostic.severity()); } void ClangTextMark::setIcon(ClangBackEnd::DiagnosticSeverity severity) @@ -79,5 +83,10 @@ void ClangTextMark::setIcon(ClangBackEnd::DiagnosticSeverity severity) TextMark::setIcon(errorIcon); } +void ClangTextMark::addToToolTipLayout(QLayout *target) +{ + Internal::addToolTipToLayout(m_diagnostic, target); +} + } // namespace ClangCodeModel diff --git a/src/plugins/clangcodemodel/clangtextmark.h b/src/plugins/clangcodemodel/clangtextmark.h index 017cec02eb..98833b3854 100644 --- a/src/plugins/clangcodemodel/clangtextmark.h +++ b/src/plugins/clangcodemodel/clangtextmark.h @@ -26,6 +26,7 @@ #pragma once #include <clangbackendipc_global.h> +#include <clangbackendipc/diagnosticcontainer.h> #include <texteditor/textmark.h> @@ -34,10 +35,13 @@ namespace ClangCodeModel { class ClangTextMark : public TextEditor::TextMark { public: - ClangTextMark(const QString &fileName, int lineNumber, ClangBackEnd::DiagnosticSeverity severity); + ClangTextMark(const QString &fileName, const ClangBackEnd::DiagnosticContainer &diagnostic); private: + void addToToolTipLayout(QLayout *target); void setIcon(ClangBackEnd::DiagnosticSeverity severity); + + ClangBackEnd::DiagnosticContainer m_diagnostic; }; } // namespace ClangCodeModel diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp index f140907a66..f96b11e4a5 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp @@ -446,6 +446,21 @@ static Core::Id toolchainType(ProjectExplorer::RunConfiguration *runConfiguratio return ToolChainKitInformation::toolChain(runConfiguration->target()->kit(), ToolChain::Language::Cxx)->typeId(); } +static QString executableForVersionCheck(Core::Id toolchainType, const QString &executable) +{ + if (toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) { + const QString suffix = QLatin1String("-cl.exe"); + if (executable.endsWith(suffix, Utils::HostOsInfo::fileNameCaseSensitivity())) { + QString modified = executable; + modified.chop(suffix.length()); + modified.append(QLatin1String(".exe")); + return modified; + } + } + + return executable; +} + void ClangStaticAnalyzerRunControl::start() { m_success = false; @@ -458,7 +473,8 @@ void ClangStaticAnalyzerRunControl::start() // Check clang executable bool isValidClangExecutable; - const QString executable = clangExecutableFromSettings(toolchainType(runConfiguration()), + const Core::Id theToolchainType = toolchainType(runConfiguration()); + const QString executable = clangExecutableFromSettings(theToolchainType, &isValidClangExecutable); if (!isValidClangExecutable) { const QString errorMessage = tr("Clang Static Analyzer: Invalid executable \"%1\", stop.") @@ -471,12 +487,13 @@ void ClangStaticAnalyzerRunControl::start() } // Check clang version - const ClangExecutableVersion version = clangExecutableVersion(executable); + const QString versionCheckExecutable = executableForVersionCheck(theToolchainType, executable); + const ClangExecutableVersion version = clangExecutableVersion(versionCheckExecutable); if (!version.isValid()) { const QString warningMessage = tr("Clang Static Analyzer: Running with possibly unsupported version, " "could not determine version from executable \"%1\".") - .arg(executable); + .arg(versionCheckExecutable); appendMessage(warningMessage + QLatin1Char('\n'), Utils::StdErrFormat); TaskHub::addTask(Task::Warning, warningMessage, Debugger::Constants::ANALYZERTASK_ID); TaskHub::requestPopup(); diff --git a/src/plugins/clearcase/clearcase.qbs b/src/plugins/clearcase/clearcase.qbs index 2c52f4690a..9fd072a28e 100644 --- a/src/plugins/clearcase/clearcase.qbs +++ b/src/plugins/clearcase/clearcase.qbs @@ -3,7 +3,7 @@ import qbs 1.0 QtcPlugin { name: "ClearCase" - pluginJsonReplacements: ({"CLEARCASE_DISABLED_STR": (qbs.targetOS.contains("osx") ? "true": "false")}) + pluginJsonReplacements: ({"CLEARCASE_DISABLED_STR": (qbs.targetOS.contains("macos") ? "true": "false")}) Depends { name: "Qt.widgets" } Depends { name: "Utils" } diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs index d2e2c7d268..ed50f54985 100644 --- a/src/plugins/coreplugin/coreplugin.qbs +++ b/src/plugins/coreplugin/coreplugin.qbs @@ -27,7 +27,7 @@ Project { return ["ole32", "user32"] } - cpp.frameworks: qbs.targetOS.contains("osx") ? ["AppKit"] : undefined + cpp.frameworks: qbs.targetOS.contains("macos") ? ["AppKit"] : undefined Group { name: "General" @@ -176,7 +176,7 @@ Project { Group { name: "ProgressManager_mac" - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") files: [ "progressmanager/progressmanager_mac.mm", ] @@ -184,7 +184,7 @@ Project { Group { name: "ProgressManager_x11" - condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos") files: [ "progressmanager/progressmanager_x11.cpp", ] @@ -288,7 +288,7 @@ Project { Group { name: "Locator_mac" - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") files: [ "locator/spotlightlocatorfilter.h", "locator/spotlightlocatorfilter.mm", diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp index 9254997c18..3b3c1cf6fc 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp @@ -273,6 +273,7 @@ ProgressManagerPrivate::ProgressManagerPrivate() m_progressViewPinned(false), m_hovered(false) { + m_opacityEffect->setOpacity(1); m_instance = this; m_progressView = new ProgressView; // withDelay, so the statusBarWidget has the chance to get the enter event @@ -346,7 +347,7 @@ void ProgressManagerPrivate::init() this, &ProgressManagerPrivate::progressDetailsToggled); toggleButton->setDefaultAction(cmd->action()); - m_progressView->setVisible(m_progressViewPinned); + updateVisibility(); initInternal(); } diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp index addeb81c75..5b06e062a2 100644 --- a/src/plugins/cppeditor/cpphoverhandler.cpp +++ b/src/plugins/cppeditor/cpphoverhandler.cpp @@ -36,9 +36,11 @@ #include <texteditor/texteditor.h> #include <utils/qtcassert.h> +#include <utils/tooltip/tooltip.h> #include <QTextCursor> #include <QUrl> +#include <QVBoxLayout> using namespace Core; using namespace TextEditor; @@ -74,8 +76,13 @@ void processWithEditorDocumentProcessor(TextEditorWidget *editorWidget, { if (CppTools::BaseEditorDocumentProcessor *processor = editorDocumentProcessor(editorWidget)) { int line, column; - if (Convenience::convertPosition(editorWidget->document(), position, &line, &column)) - processor->showDiagnosticTooltip(point, editorWidget, line, column); + if (Convenience::convertPosition(editorWidget->document(), position, &line, &column)) { + auto layout = new QVBoxLayout; + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(2); + processor->addDiagnosticToolTipToLayout(line, column, layout); + Utils::ToolTip::show(point, layout, editorWidget); + } } } diff --git a/src/plugins/cpptools/baseeditordocumentparser.cpp b/src/plugins/cpptools/baseeditordocumentparser.cpp index 4a216e17ae..ee3b8bec5c 100644 --- a/src/plugins/cpptools/baseeditordocumentparser.cpp +++ b/src/plugins/cpptools/baseeditordocumentparser.cpp @@ -78,8 +78,15 @@ void BaseEditorDocumentParser::setConfiguration(const Configuration &configurati void BaseEditorDocumentParser::update(const WorkingCopy &workingCopy) { + QFutureInterface<void> dummy; + update(dummy, workingCopy); +} + +void BaseEditorDocumentParser::update(const QFutureInterface<void> &future, + const WorkingCopy &workingCopy) +{ QMutexLocker locker(&m_updateIsRunning); - updateHelper(workingCopy); + updateHelper(future, workingCopy); } BaseEditorDocumentParser::State BaseEditorDocumentParser::state() const diff --git a/src/plugins/cpptools/baseeditordocumentparser.h b/src/plugins/cpptools/baseeditordocumentparser.h index 3822394c61..328fe421fd 100644 --- a/src/plugins/cpptools/baseeditordocumentparser.h +++ b/src/plugins/cpptools/baseeditordocumentparser.h @@ -29,6 +29,7 @@ #include "cppworkingcopy.h" #include "projectpart.h" +#include <QFutureInterface> #include <QObject> #include <QMutex> @@ -39,7 +40,7 @@ class CPPTOOLS_EXPORT BaseEditorDocumentParser : public QObject Q_OBJECT public: - using Ptr = QSharedPointer<BaseEditorDocumentParser>;; + using Ptr = QSharedPointer<BaseEditorDocumentParser>; static Ptr get(const QString &filePath); struct Configuration { @@ -58,6 +59,7 @@ public: void setConfiguration(const Configuration &configuration); void update(const WorkingCopy &workingCopy); + void update(const QFutureInterface<void> &future, const WorkingCopy &workingCopy); ProjectPart::Ptr projectPart() const; @@ -76,7 +78,8 @@ protected: mutable QMutex m_stateAndConfigurationMutex; private: - virtual void updateHelper(const WorkingCopy &workingCopy) = 0; + virtual void updateHelper(const QFutureInterface<void> &future, + const WorkingCopy &workingCopy) = 0; const QString m_filePath; Configuration m_configuration; diff --git a/src/plugins/cpptools/baseeditordocumentprocessor.cpp b/src/plugins/cpptools/baseeditordocumentprocessor.cpp index c437bceb80..82aa058b90 100644 --- a/src/plugins/cpptools/baseeditordocumentprocessor.cpp +++ b/src/plugins/cpptools/baseeditordocumentprocessor.cpp @@ -63,7 +63,7 @@ bool BaseEditorDocumentProcessor::hasDiagnosticsAt(uint, uint) const return false; } -void BaseEditorDocumentProcessor::showDiagnosticTooltip(const QPoint &, QWidget *, uint, uint) const +void BaseEditorDocumentProcessor::addDiagnosticToolTipToLayout(uint, uint, QLayout *) const { } @@ -77,7 +77,7 @@ void BaseEditorDocumentProcessor::runParser(QFutureInterface<void> &future, return; } - parser->update(workingCopy); + parser->update(future, workingCopy); CppToolsBridge::finishedRefreshingSourceFiles({parser->filePath()}); future.setProgressValue(1); diff --git a/src/plugins/cpptools/baseeditordocumentprocessor.h b/src/plugins/cpptools/baseeditordocumentprocessor.h index 844cadc64c..77723fcd4c 100644 --- a/src/plugins/cpptools/baseeditordocumentprocessor.h +++ b/src/plugins/cpptools/baseeditordocumentprocessor.h @@ -65,10 +65,7 @@ public: extraRefactoringOperations(const TextEditor::AssistInterface &assistInterface); virtual bool hasDiagnosticsAt(uint line, uint column) const; - virtual void showDiagnosticTooltip(const QPoint &point, - QWidget *parent, - uint line, - uint column) const; + virtual void addDiagnosticToolTipToLayout(uint line, uint column, QLayout *layout) const; signals: // Signal interface to implement diff --git a/src/plugins/cpptools/builtineditordocumentparser.cpp b/src/plugins/cpptools/builtineditordocumentparser.cpp index 014252b13d..8ab6a89101 100644 --- a/src/plugins/cpptools/builtineditordocumentparser.cpp +++ b/src/plugins/cpptools/builtineditordocumentparser.cpp @@ -55,7 +55,8 @@ BuiltinEditorDocumentParser::BuiltinEditorDocumentParser(const QString &filePath qRegisterMetaType<CPlusPlus::Snapshot>("CPlusPlus::Snapshot"); } -void BuiltinEditorDocumentParser::updateHelper(const WorkingCopy &theWorkingCopy) +void BuiltinEditorDocumentParser::updateHelper(const QFutureInterface<void> &future, + const WorkingCopy &theWorkingCopy) { if (filePath().isEmpty()) return; @@ -181,6 +182,10 @@ void BuiltinEditorDocumentParser::updateHelper(const WorkingCopy &theWorkingCopy if (releaseSourceAndAST_) doc->releaseSourceAndAST(); }); + sourceProcessor.setCancelChecker([future]() { + return future.isCanceled(); + }); + Snapshot globalSnapshot = modelManager->snapshot(); globalSnapshot.remove(filePath()); sourceProcessor.setGlobalSnapshot(globalSnapshot); diff --git a/src/plugins/cpptools/builtineditordocumentparser.h b/src/plugins/cpptools/builtineditordocumentparser.h index c2eb4c86ee..94ae556574 100644 --- a/src/plugins/cpptools/builtineditordocumentparser.h +++ b/src/plugins/cpptools/builtineditordocumentparser.h @@ -58,7 +58,8 @@ public: static Ptr get(const QString &filePath); private: - void updateHelper(const WorkingCopy &workingCopy) override; + void updateHelper(const QFutureInterface<void> &future, + const WorkingCopy &workingCopy) override; void addFileAndDependencies(CPlusPlus::Snapshot *snapshot, QSet<Utils::FileName> *toRemove, const Utils::FileName &fileName) const; diff --git a/src/plugins/cpptools/cppcompletionassistprocessor.cpp b/src/plugins/cpptools/cppcompletionassistprocessor.cpp index 5dd5228538..d1a1be9bac 100644 --- a/src/plugins/cpptools/cppcompletionassistprocessor.cpp +++ b/src/plugins/cpptools/cppcompletionassistprocessor.cpp @@ -40,7 +40,7 @@ using namespace CPlusPlus; namespace CppTools { -CppCompletionAssistProcessor::CppCompletionAssistProcessor() +CppCompletionAssistProcessor::CppCompletionAssistProcessor(int snippetItemOrder) : m_positionForProposal(-1) , m_preprocessorCompletions(QStringList() << QLatin1String("define") @@ -72,7 +72,8 @@ CppCompletionAssistProcessor::CppCompletionAssistProcessor() << QLatin1String("endif")) , m_hintProposal(0) , m_snippetCollector(QLatin1String(CppEditor::Constants::CPP_SNIPPETS_GROUP_ID), - QIcon(QLatin1String(":/texteditor/images/snippet.png"))) + QIcon(QLatin1String(":/texteditor/images/snippet.png")), + snippetItemOrder) { } diff --git a/src/plugins/cpptools/cppcompletionassistprocessor.h b/src/plugins/cpptools/cppcompletionassistprocessor.h index 7ccc632e63..535ce62a5e 100644 --- a/src/plugins/cpptools/cppcompletionassistprocessor.h +++ b/src/plugins/cpptools/cppcompletionassistprocessor.h @@ -45,7 +45,7 @@ namespace CppTools { class CPPTOOLS_EXPORT CppCompletionAssistProcessor : public TextEditor::IAssistProcessor { public: - CppCompletionAssistProcessor(); + CppCompletionAssistProcessor(int snippetItemOrder = 0); protected: void addSnippets(); diff --git a/src/plugins/cpptools/cppsourceprocessor.cpp b/src/plugins/cpptools/cppsourceprocessor.cpp index f238a841f7..e04d977ebf 100644 --- a/src/plugins/cpptools/cppsourceprocessor.cpp +++ b/src/plugins/cpptools/cppsourceprocessor.cpp @@ -121,6 +121,11 @@ CppSourceProcessor::CppSourceProcessor(const Snapshot &snapshot, DocumentCallbac CppSourceProcessor::~CppSourceProcessor() { } +void CppSourceProcessor::setCancelChecker(const CppSourceProcessor::CancelChecker &cancelChecker) +{ + m_preprocess.setCancelChecker(cancelChecker); +} + void CppSourceProcessor::setWorkingCopy(const WorkingCopy &workingCopy) { m_workingCopy = workingCopy; } diff --git a/src/plugins/cpptools/cppsourceprocessor.h b/src/plugins/cpptools/cppsourceprocessor.h index fdebc893c6..84ea034347 100644 --- a/src/plugins/cpptools/cppsourceprocessor.h +++ b/src/plugins/cpptools/cppsourceprocessor.h @@ -59,6 +59,9 @@ public: CppSourceProcessor(const CPlusPlus::Snapshot &snapshot, DocumentCallback documentFinished); ~CppSourceProcessor(); + using CancelChecker = std::function<bool()>; + void setCancelChecker(const CancelChecker &cancelChecker); + void setWorkingCopy(const CppTools::WorkingCopy &workingCopy); void setHeaderPaths(const ProjectPartHeaderPaths &headerPaths); void setLanguageFeatures(CPlusPlus::LanguageFeatures languageFeatures); diff --git a/src/plugins/debugger/console/consoleview.cpp b/src/plugins/debugger/console/consoleview.cpp index 4c5d7f1df1..db80e9cee6 100644 --- a/src/plugins/debugger/console/consoleview.cpp +++ b/src/plugins/debugger/console/consoleview.cpp @@ -80,7 +80,6 @@ ConsoleView::ConsoleView(ConsoleItemModel *model, QWidget *parent) : setFrameStyle(QFrame::NoFrame); setHeaderHidden(true); setRootIsDecorated(false); - setUniformRowHeights(true); setEditTriggers(QAbstractItemView::AllEditTriggers); setStyleSheet(QLatin1String("QTreeView::branch:has-siblings:!adjoins-item {" "border-image: none;" diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index d3d5ceb3f8..7821532832 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -265,7 +265,7 @@ void DebuggerMainWindow::loadPerspectiveHelper(const QByteArray &perspectiveId, ICore::removeAdditionalContext(Context(Id::fromName(m_currentPerspectiveId))); const Perspective *perspective = m_perspectiveForPerspectiveId.value(m_currentPerspectiveId); - QWidget *central = perspective->centralWidget(); + QWidget *central = perspective ? perspective->centralWidget() : nullptr; m_centralWidgetStack->removeWidget(central ? central : m_editorPlaceHolder); } diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index c6961ad62d..0d4ec99880 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -664,7 +664,7 @@ void QmlEngine::interruptInferior() { showMessage(INTERRUPT, LogInput); d->runDirectCommand(INTERRUPT); - notifyInferiorStopOk(); + showStatusMessage(tr("Waiting for JavaScript engine to interrupt on next statement.")); } void QmlEngine::executeStep() @@ -1961,7 +1961,8 @@ void QmlEnginePrivate::messageReceived(const QByteArray &data) } engine->notifyInferiorSpontaneousStop(); backtrace(); - } else if (engine->state() == InferiorStopOk) { + } else if (engine->state() == InferiorStopRequested) { + engine->notifyInferiorStopOk(); backtrace(); } } diff --git a/src/plugins/ios/ios.qbs b/src/plugins/ios/ios.qbs index 0eb70f2f10..e38618c7a4 100644 --- a/src/plugins/ios/ios.qbs +++ b/src/plugins/ios/ios.qbs @@ -11,7 +11,7 @@ QtcPlugin { Depends { name: "QmlDebug" } Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] } - cpp.frameworks: base.concat(qbs.targetOS.contains("osx") ? ["CoreFoundation", "IOKit"] : []) + cpp.frameworks: base.concat(qbs.targetOS.contains("macos") ? ["CoreFoundation", "IOKit"] : []) files: [ "ios.qrc", diff --git a/src/plugins/projectexplorer/customparserconfigdialog.ui b/src/plugins/projectexplorer/customparserconfigdialog.ui index b79dbe3285..7901db4e9b 100644 --- a/src/plugins/projectexplorer/customparserconfigdialog.ui +++ b/src/plugins/projectexplorer/customparserconfigdialog.ui @@ -429,8 +429,17 @@ <tabstop>errorFileNameCap</tabstop> <tabstop>errorLineNumberCap</tabstop> <tabstop>errorMessageCap</tabstop> + <tabstop>errorStdOutChannel</tabstop> + <tabstop>errorStdErrChannel</tabstop> <tabstop>errorOutputMessage</tabstop> - <tabstop>buttonBox</tabstop> + <tabstop>tabWidget</tabstop> + <tabstop>warningPattern</tabstop> + <tabstop>warningFileNameCap</tabstop> + <tabstop>warningLineNumberCap</tabstop> + <tabstop>warningMessageCap</tabstop> + <tabstop>warningStdOutChannel</tabstop> + <tabstop>warningStdErrChannel</tabstop> + <tabstop>warningOutputMessage</tabstop> </tabstops> <resources/> <connections> diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index 975a177172..0622f60b9c 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -152,7 +152,7 @@ void TargetSelectorDelegate::paint(QPainter *painter, QFontMetrics fm(option.font); QString text = index.data(Qt::DisplayRole).toString(); - painter->setPen(QColor(255, 255, 255, 160)); + painter->setPen(creatorTheme()->color(Theme::MiniProjectTargetSelectorTextColor)); QString elidedText = fm.elidedText(text, Qt::ElideMiddle, option.rect.width() - 12); if (elidedText != text) const_cast<QAbstractItemModel *>(index.model())->setData(index, text, Qt::ToolTipRole); @@ -174,7 +174,10 @@ ListWidget::ListWidget(QWidget *parent) : QListWidget(parent) setFocusPolicy(Qt::WheelFocus); setItemDelegate(new TargetSelectorDelegate(this)); setAttribute(Qt::WA_MacShowFocusRect, false); - setStyleSheet(QString::fromLatin1("QListWidget { background: #464646; border-style: none; }")); + const QColor bgColor = creatorTheme()->color(Theme::MiniProjectTargetSelectorBackgroundColor); + const QString bgColorName = creatorTheme()->flag(Theme::FlatToolBars) + ? bgColor.lighter(120).name() : bgColor.name(); + setStyleSheet(QString::fromLatin1("QListWidget { background: %1; border-style: none; }").arg(bgColorName)); setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); } diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs index 9ca58e306d..3b24451dec 100644 --- a/src/plugins/projectexplorer/projectexplorer.qbs +++ b/src/plugins/projectexplorer/projectexplorer.qbs @@ -17,7 +17,7 @@ Project { cpp.defines: base.concat("QTC_CPU=X86Architecture") Properties { - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") cpp.frameworks: base.concat(["Carbon"]) } diff --git a/src/plugins/projectexplorer/projectwizardpage.ui b/src/plugins/projectexplorer/projectwizardpage.ui index 37e53de2a2..d42fb7edeb 100644 --- a/src/plugins/projectexplorer/projectwizardpage.ui +++ b/src/plugins/projectexplorer/projectwizardpage.ui @@ -135,6 +135,12 @@ <header location="global">utils/treeviewcombobox.h</header> </customwidget> </customwidgets> + <tabstops> + <tabstop>projectComboBox</tabstop> + <tabstop>addToVersionControlComboBox</tabstop> + <tabstop>vcsManageButton</tabstop> + <tabstop>scrollArea</tabstop> + </tabstops> <resources/> <connections/> </ui> diff --git a/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp b/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp index 053bf1c240..6efb9c8d5e 100644 --- a/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp +++ b/src/plugins/qmldesigner/components/componentcore/qmldesignericonprovider.cpp @@ -78,6 +78,99 @@ QPixmap QmlDesignerIconProvider::requestPixmap(const QString &id, QSize *size, c else if (id == "tr") result = Icon({ { ":/qmldesigner/images/tr.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "ok") + result = Icon({ + { ":/utils/images/ok.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "error") + result = Icon({ + { ":/utils/images/error.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "anchor-top") + result = Icon({ + { ":/qmldesigner/images/anchor_top.png", Theme::IconsBaseColor}, + { ":/qmldesigner/images/anchoreditem.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "anchor-right") + result = Icon({ + { ":/qmldesigner/images/anchor_right.png", Theme::IconsBaseColor}, + { ":/qmldesigner/images/anchoreditem.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "anchor-bottom") + result = Icon({ + { ":/qmldesigner/images/anchor_bottom.png", Theme::IconsBaseColor}, + { ":/qmldesigner/images/anchoreditem.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "anchor-left") + result = Icon({ + { ":/qmldesigner/images/anchor_left.png", Theme::IconsBaseColor}, + { ":/qmldesigner/images/anchoreditem.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "anchor-horizontal") + result = Icon({ + { ":/qmldesigner/images/anchor_horizontal.png", Theme::IconsBaseColor}, + { ":/qmldesigner/images/anchoreditem.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "anchor-vertical") + result = Icon({ + { ":/qmldesigner/images/anchor_vertical.png", Theme::IconsBaseColor}, + { ":/qmldesigner/images/anchoreditem.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "anchor-fill") + result = Icon({ + { ":/qmldesigner/images/anchor_fill.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-left") + result = Icon({ + { ":/qmldesigner/images/alignment_left.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-left-h") + result = Icon({ + { ":/qmldesigner/images/alignment_left.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-center") + result = Icon({ + { ":/qmldesigner/images/alignment_center.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-center-h") + result = Icon({ + { ":/qmldesigner/images/alignment_center.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-right") + result = Icon({ + { ":/qmldesigner/images/alignment_right.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-right-h") + result = Icon({ + { ":/qmldesigner/images/alignment_right.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-top") + result = Icon({ + { ":/qmldesigner/images/alignment_top.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-top-h") + result = Icon({ + { ":/qmldesigner/images/alignment_top.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-middle") + result = Icon({ + { ":/qmldesigner/images/alignment_middle.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-middle-h") + result = Icon({ + { ":/qmldesigner/images/alignment_middle.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-bottom") + result = Icon({ + { ":/qmldesigner/images/alignment_bottom.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "alignment-bottom-h") + result = Icon({ + { ":/qmldesigner/images/alignment_bottom.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "style-bold") + result = Icon({ + { ":/qmldesigner/images/style_bold.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "style-bold-h") + result = Icon({ + { ":/qmldesigner/images/style_bold.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "style-italic") + result = Icon({ + { ":/qmldesigner/images/style_italic.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "style-italic-h") + result = Icon({ + { ":/qmldesigner/images/style_italic.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "style-underline") + result = Icon({ + { ":/qmldesigner/images/style_underline.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "style-underline-h") + result = Icon({ + { ":/qmldesigner/images/style_underline.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); + else if (id == "style-strikeout") + result = Icon({ + { ":/qmldesigner/images/style_strikeout.png", Theme::IconsBaseColor}}, Icon::Tint).pixmap(); + else if (id == "style-strikeout-h") + result = Icon({ + { ":/qmldesigner/images/style_strikeout.png", Theme::QmlDesigner_HighlightColor}}, Icon::Tint).pixmap(); else qWarning() << Q_FUNC_INFO << "Image not found:" << id; diff --git a/src/plugins/qmldesigner/components/componentcore/theming.cpp b/src/plugins/qmldesigner/components/componentcore/theming.cpp index a096b9b51e..c2ba9b37d9 100644 --- a/src/plugins/qmldesigner/components/componentcore/theming.cpp +++ b/src/plugins/qmldesigner/components/componentcore/theming.cpp @@ -27,31 +27,31 @@ #include "qmldesignericonprovider.h" #include <utils/theme/theme.h> +#include <utils/stylehelper.h> #include <QRegExp> namespace QmlDesigner { +QColor midtone(const QColor &a, const QColor &b) +{ + QColor alphaB = b; + alphaB.setAlpha(128); + return Utils::StyleHelper::alphaBlendedColors(a ,alphaB); +} + void Theming::insertTheme(QQmlPropertyMap *map) { const QVariantHash creatorTheme = Utils::creatorTheme()->values(); for (auto it = creatorTheme.constBegin(); it != creatorTheme.constEnd(); ++it) map->insert(it.key(), it.value()); - /* Custom Colors */ - - QColor darkerBackground = Utils::creatorTheme()->color(Utils::Theme::BackgroundColorDark); - - if (darkerBackground.value() < 40) - darkerBackground = darkerBackground.lighter(150); - - map->insert("QmlDesignerBackgroundColorDarker", darkerBackground.darker(120)); - map->insert("QmlDesignerBackgroundColorLighter", darkerBackground.lighter(140)); - - if (darkerBackground.value() < 100) - map->insert("QmlDesignerBackgroundColorDarkAlternate", darkerBackground.lighter(120)); - else - map->insert("QmlDesignerBackgroundColorDarkAlternate", darkerBackground.lighter(110)); + /* Define QmlDesigner colors and remove alpha channels */ + const QColor panelStatusBarBackgroundColor = Utils::creatorTheme()->color(Utils::Theme::PanelStatusBarBackgroundColor); + const QColor fancyToolButtonSelectedColor = Utils::creatorTheme()->color(Utils::Theme::FancyToolButtonSelectedColor); + const QColor darkerBackground = Utils::StyleHelper::alphaBlendedColors(panelStatusBarBackgroundColor, fancyToolButtonSelectedColor); + const QColor fancyToolButtonHoverColor = Utils::creatorTheme()->color(Utils::Theme::FancyToolButtonHoverColor); + const QColor buttonColor = Utils::StyleHelper::alphaBlendedColors(panelStatusBarBackgroundColor, fancyToolButtonHoverColor); Utils::creatorTheme()->color(Utils::Theme::PanelTextColorLight); QColor tabLight = Utils::creatorTheme()->color(Utils::Theme::PanelTextColorLight); @@ -64,8 +64,12 @@ void Theming::insertTheme(QQmlPropertyMap *map) tabDark = tabDark.darker(260); } + map->insert("QmlDesignerBackgroundColorDarker", darkerBackground); + map->insert("QmlDesignerBackgroundColorDarkAlternate", midtone(panelStatusBarBackgroundColor, buttonColor)); map->insert("QmlDesignerTabLight", tabLight); map->insert("QmlDesignerTabDark", tabDark); + map->insert("QmlDesignerButtonColor", buttonColor); + map->insert("QmlDesignerBorderColor", Utils::creatorTheme()->color(Utils::Theme::SplitterColor)); } QString Theming::replaceCssColors(const QString &input) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index 1e3f09fac2..8e8c996793 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -424,8 +424,10 @@ void FormEditorView::instanceInformationsChange(const QMultiHash<ModelNode, Info if (qmlItemNode.instanceBoundingRect().isEmpty() && !(qmlItemNode.propertyAffectedByCurrentState("width") && qmlItemNode.propertyAffectedByCurrentState("height"))) { - rootModelNode().setAuxiliaryData("width", 640); - rootModelNode().setAuxiliaryData("height", 480); + if (!(rootModelNode().hasAuxiliaryData("width"))) + rootModelNode().setAuxiliaryData("width", 640); + if (!(rootModelNode().hasAuxiliaryData("height"))) + rootModelNode().setAuxiliaryData("height", 480); rootModelNode().setAuxiliaryData("autoSize", true); formEditorWidget()->updateActions(); } else { diff --git a/src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp b/src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp index 9dbf66d883..b2b7457149 100644 --- a/src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/selectionindicator.cpp @@ -91,6 +91,7 @@ void SelectionIndicator::setItems(const QList<FormEditorItem*> &itemList) newSelectionIndicatorGraphicsItem->setFlag(QGraphicsItem::ItemIsSelectable, false); QPen pen; + pen.setJoinStyle(Qt::MiterJoin); pen.setColor(QColor(108, 141, 221)); newSelectionIndicatorGraphicsItem->setPen(pen); newSelectionIndicatorGraphicsItem->setCursor(m_cursor); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp index f68f520e20..08e65c847b 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp @@ -36,11 +36,14 @@ #include <QVariant> #include <QMetaProperty> +#include <QLoggingCategory> #include <QMimeData> #include <QPainter> #include <QPen> #include <qdebug.h> +static Q_LOGGING_CATEGORY(itemlibraryPopulate, "itemlibrary.populate") + static bool inline registerItemLibrarySortedModel() { qmlRegisterType<QmlDesigner::ItemLibrarySectionModel>(); return true; @@ -150,23 +153,35 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model) if (import.isLibraryImport()) imports << import.url() + QLatin1Char(' ') + import.version(); + + qCInfo(itemlibraryPopulate) << Q_FUNC_INFO; foreach (ItemLibraryEntry entry, itemLibraryInfo->entries()) { - NodeMetaInfo metaInfo = model->metaInfo(entry.typeName()); - bool valid = metaInfo.isValid() && metaInfo.majorVersion() == entry.majorVersion(); - bool isItem = valid && metaInfo.isSubclassOf("QtQuick.Item"); + qCInfo(itemlibraryPopulate) << entry.typeName() << entry.majorVersion() << entry.minorVersion(); + + NodeMetaInfo metaInfo = model->metaInfo(entry.typeName()); + + qCInfo(itemlibraryPopulate) << "valid: " << metaInfo.isValid() << metaInfo.majorVersion() << metaInfo.minorVersion(); - if (!isItem && valid) { - qDebug() << Q_FUNC_INFO; - qDebug() << metaInfo.typeName() << "is not a QtQuick.Item"; - qDebug() << Utils::transform(metaInfo.superClasses(), &NodeMetaInfo::typeName); - } + bool valid = metaInfo.isValid() && metaInfo.majorVersion() == entry.majorVersion(); + bool isItem = valid && metaInfo.isSubclassOf("QtQuick.Item"); + + qCInfo(itemlibraryPopulate) << "isItem: " << isItem; + + qCInfo(itemlibraryPopulate) << "required import: " << entry.requiredImport() << entryToImport(entry).toImportString(); + + if (!isItem && valid) { + qDebug() << Q_FUNC_INFO; + qDebug() << metaInfo.typeName() << "is not a QtQuick.Item"; + qDebug() << Utils::transform(metaInfo.superClasses(), &NodeMetaInfo::typeName); + } - if (valid - && isItem //We can change if the navigator does support pure QObjects - && (entry.requiredImport().isEmpty() - || model->hasImport(entryToImport(entry), true, true))) { + if (valid + && isItem //We can change if the navigator does support pure QObjects + && (entry.requiredImport().isEmpty() + || model->hasImport(entryToImport(entry), true, true))) { QString itemSectionName = entry.category(); + qCInfo(itemlibraryPopulate) << "Adding:" << entry.typeName() << "to:" << entry.category(); ItemLibrarySection *sectionModel = sectionByName(itemSectionName); if (sectionModel == 0) { diff --git a/src/plugins/qmldesigner/components/resources/formeditorstylesheet.css b/src/plugins/qmldesigner/components/resources/formeditorstylesheet.css index f11a2a42d4..1ab3cf047f 100644 --- a/src/plugins/qmldesigner/components/resources/formeditorstylesheet.css +++ b/src/plugins/qmldesigner/components/resources/formeditorstylesheet.css @@ -14,3 +14,12 @@ QGraphicsView:focus { background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate; } +QLineEdit +{ + color: creatorTheme.PanelTextColorLight; + border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker; + padding: 2px 8px; + margin: 2px; + background-color: creatorTheme.FancyToolButtonSelectedColor; + selection-background-color: darkgray; +} diff --git a/src/plugins/qmldesigner/components/resources/scrollbar.css b/src/plugins/qmldesigner/components/resources/scrollbar.css index e55255fcb8..164417a4c9 100644 --- a/src/plugins/qmldesigner/components/resources/scrollbar.css +++ b/src/plugins/qmldesigner/components/resources/scrollbar.css @@ -1,18 +1,18 @@ QScrollBar:vertical { background-color: creatorTheme.BackgroundColorDark; - border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker; + border: none; margin-top: 3; margin-bottom: 3; width: 10; } QScrollBar::handle:vertical { - background-color: creatorTheme.QmlDesignerBackgroundColorLighter; + background-color: creatorTheme.QmlDesignerButtonColor; margin-top: -5; margin-bottom: -5; min-height: 18px; width: 8px; - border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker; + border: none; border-width: 1; margin-left: -1; margin-right: -1; @@ -45,20 +45,20 @@ QScrollBar:horizontal { background-color: creatorTheme.BackgroundColorDark; - border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker; + border: none; margin-left: 3; margin-right: 3; height: 10; } QScrollBar::handle:horizontal { - background-color: creatorTheme.QmlDesignerBackgroundColorLighter; + background-color: creatorTheme.QmlDesignerButtonColor; margin-left: -5; margin-right: -5; min-width: 18px; height: 8px; - border: 1px solid creatorTheme.QmlDesignerBackgroundColorDarker; + border: none; border-width: 1; margin-top: -1; margin-bottom: -1; diff --git a/src/plugins/qmldesigner/components/resources/stylesheet.css b/src/plugins/qmldesigner/components/resources/stylesheet.css index f423f75559..126ac51b29 100644 --- a/src/plugins/qmldesigner/components/resources/stylesheet.css +++ b/src/plugins/qmldesigner/components/resources/stylesheet.css @@ -37,14 +37,6 @@ QTabWidget::pane { /* The tab widget frame */ background-color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate; } -QLineEdit -{ - border: 2px solid #8F8F8F; - padding: 0 8px; - background-color: white; - selection-background-color: darkgray; -} - QLineEdit#itemLibrarySearchInput { color: creatorTheme.PanelTextColorLight; @@ -59,19 +51,13 @@ QLineEdit#itemLibrarySearchInput QTreeView { color: creatorTheme.PanelTextColorLight; selection-color: creatorTheme.PanelTextColorLight; - } - - QTreeView::item:selected { - color: creatorTheme.PanelTextColorLight; + selection-background-color: creatorTheme.QmlDesigner_HighlightColor; } QListView { - color:creatorTheme.PanelTextColorLight; + color: creatorTheme.PanelTextColorLight; selection-color: creatorTheme.PanelTextColorLight; - } - - QListView::item:selected { - color: creatorTheme.PanelTextColorLight; + selection-background-color: creatorTheme.QmlDesigner_HighlightColor; } QComboBox QAbstractItemView { diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp index a525196d0a..ae869763cd 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp @@ -96,7 +96,6 @@ StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, State setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); rootContext()->setContextProperty(QStringLiteral("statesEditorModel"), statesEditorModel); - rootContext()->setContextProperty(QStringLiteral("highlightColor"), Utils::StyleHelper::notTooBrightHighlightColor()); rootContext()->setContextProperty(QLatin1String("canAddNewStates"), true); diff --git a/src/plugins/qmldesigner/componentsplugin/components.metainfo b/src/plugins/qmldesigner/componentsplugin/components.metainfo index 01da4319f9..29490fa471 100644 --- a/src/plugins/qmldesigner/componentsplugin/components.metainfo +++ b/src/plugins/qmldesigner/componentsplugin/components.metainfo @@ -72,32 +72,6 @@ MetaInfo { } Type { - name: "QtQuick.Controls.ButtonRow" - icon: ":/componentsplugin/images/buttonrow16.png" - - ItemLibraryEntry { - name: "Button Row" - category: "Qt Quick - Controls" - libraryIcon: ":/componentsplugin/images/buttonrow.png" - version: "1.0" - requiredImport: "QtQuick.Controls" - } - } - - Type { - name: "QtQuick.Controls.ButtonColumn" - icon: ":/componentsplugin/images/buttoncolumn16.png" - - ItemLibraryEntry { - name: "Button Column" - category: "Qt Quick - Controls" - libraryIcon: ":/componentsplugin/images/buttoncolumn.png" - version: "1.0" - requiredImport: "QtQuick.Controls" - } - } - - Type { name: "QtQuick.Controls.Label" icon: ":/componentsplugin/images/label16.png" @@ -168,7 +142,7 @@ MetaInfo { ItemLibraryEntry { name: "Slider (Vertical)" category: "Qt Quick - Controls" - libraryIcon: ":/componentsplugin/images/sliderh.png" + libraryIcon: ":/componentsplugin/images/slider.png" version: "1.0" requiredImport: "QtQuick.Controls" Property { name: "orientation"; type: "Enumeration"; value: "Qt.Vertical"; } @@ -342,6 +316,22 @@ MetaInfo { } } +Type { + name: "QtQuick.Layouts.StackLayout" + icon: ":/componentsplugin/images/stack-layouts-icon-16px.png" + + ItemLibraryEntry { + name: "StackLayout" + category: "Qt Quick - Layouts" + libraryIcon: ":/componentsplugin/images/stack-layouts-icon.png" + version: "1.3" + requiredImport: "QtQuick.Layouts" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + } +} + Type { name: "QtQuick.Controls.TabView" icon: ":/componentsplugin/images/window16.png" diff --git a/src/plugins/qmldesigner/componentsplugin/componentsplugin.qbs b/src/plugins/qmldesigner/componentsplugin/componentsplugin.qbs index 55f6c6a1df..e8a5cae40b 100644 --- a/src/plugins/qmldesigner/componentsplugin/componentsplugin.qbs +++ b/src/plugins/qmldesigner/componentsplugin/componentsplugin.qbs @@ -4,7 +4,7 @@ QtcProduct { name: "componentsplugin" type: ["dynamiclibrary"] installDir: qtc.ide_plugin_path + '/' + installDirName - property string installDirName: qbs.targetOS.contains("osx") ? "QmlDesigner" : "qmldesigner" + property string installDirName: qbs.targetOS.contains("macos") ? "QmlDesigner" : "qmldesigner" Depends { name: "Core" } Depends { name: "QmlDesigner" } diff --git a/src/plugins/qmldesigner/componentsplugin/componentsplugin.qrc b/src/plugins/qmldesigner/componentsplugin/componentsplugin.qrc index dcc5f6eccf..04b2667776 100644 --- a/src/plugins/qmldesigner/componentsplugin/componentsplugin.qrc +++ b/src/plugins/qmldesigner/componentsplugin/componentsplugin.qrc @@ -3,10 +3,6 @@ <file>components.metainfo</file> <file>images/button.png</file> <file>images/button16.png</file> - <file>images/buttoncolumn.png</file> - <file>images/buttoncolumn16.png</file> - <file>images/buttonrow.png</file> - <file>images/buttonrow16.png</file> <file>images/checkbox.png</file> <file>images/checkbox16.png</file> <file>images/combobox.png</file> @@ -19,20 +15,12 @@ <file>images/radiobutton16.png</file> <file>images/slider.png</file> <file>images/slider16.png</file> - <file>images/sliderh.png</file> - <file>images/sliderh16.png</file> <file>images/label.png</file> <file>images/label16.png</file> - <file>images/tabbar.png</file> - <file>images/tabbar16.png</file> - <file>images/tabbutton.png</file> - <file>images/tabbutton16.png</file> <file>images/textarea.png</file> <file>images/textarea16.png</file> <file>images/textfield.png</file> <file>images/textfield16.png</file> - <file>images/toolbar.png</file> - <file>images/toolbar16.png</file> <file>images/window.png</file> <file>images/window16.png</file> <file>images/column-layouts-icon.png</file> @@ -43,6 +31,8 @@ <file>images/row-layouts-icon-16px.png</file> <file>images/splitview-layouts-icon.png</file> <file>images/splitview-layouts-icon-16px.png</file> + <file>images/stack-layouts-icon.png</file> + <file>images/stack-layouts-icon-16px.png</file> </qresource> <qresource prefix="/propertyEditorQmlSources/QtQuick"> <file>Controls/ButtonSpecifics.qml</file> diff --git a/src/plugins/qmldesigner/componentsplugin/images/busyindicator.png b/src/plugins/qmldesigner/componentsplugin/images/busyindicator.png Binary files differdeleted file mode 100644 index 3cf3c11ddb..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/busyindicator.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/busyindicator16.png b/src/plugins/qmldesigner/componentsplugin/images/busyindicator16.png Binary files differdeleted file mode 100644 index 15e7f442a6..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/busyindicator16.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/busyindicatora.png b/src/plugins/qmldesigner/componentsplugin/images/busyindicatora.png Binary files differdeleted file mode 100644 index 4cd7ad590a..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/busyindicatora.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/busyindicatora16.png b/src/plugins/qmldesigner/componentsplugin/images/busyindicatora16.png Binary files differdeleted file mode 100644 index 2e6083c1c8..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/busyindicatora16.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/button.png b/src/plugins/qmldesigner/componentsplugin/images/button.png Binary files differindex 96e45e7233..da994e512a 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/button.png +++ b/src/plugins/qmldesigner/componentsplugin/images/button.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/button16.png b/src/plugins/qmldesigner/componentsplugin/images/button16.png Binary files differindex 5f550f968e..9d0d3f69ac 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/button16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/button16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/buttoncolumn.png b/src/plugins/qmldesigner/componentsplugin/images/buttoncolumn.png Binary files differdeleted file mode 100644 index b58d81bc0e..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/buttoncolumn.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/buttoncolumn16.png b/src/plugins/qmldesigner/componentsplugin/images/buttoncolumn16.png Binary files differdeleted file mode 100644 index 9fb324bf8a..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/buttoncolumn16.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/buttonrow.png b/src/plugins/qmldesigner/componentsplugin/images/buttonrow.png Binary files differdeleted file mode 100644 index 298be98fb4..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/buttonrow.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/buttonrow16.png b/src/plugins/qmldesigner/componentsplugin/images/buttonrow16.png Binary files differdeleted file mode 100644 index 0966da8559..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/buttonrow16.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/checkbox.png b/src/plugins/qmldesigner/componentsplugin/images/checkbox.png Binary files differindex 586167f65a..32f1efe09c 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/checkbox.png +++ b/src/plugins/qmldesigner/componentsplugin/images/checkbox.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/checkbox16.png b/src/plugins/qmldesigner/componentsplugin/images/checkbox16.png Binary files differindex 569ec6e2f6..5b00d5536f 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/checkbox16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/checkbox16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/combobox.png b/src/plugins/qmldesigner/componentsplugin/images/combobox.png Binary files differindex ba363fd3ce..e1993cc970 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/combobox.png +++ b/src/plugins/qmldesigner/componentsplugin/images/combobox.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/combobox16.png b/src/plugins/qmldesigner/componentsplugin/images/combobox16.png Binary files differindex 09d74c8c20..b0a536ebb7 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/combobox16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/combobox16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/item-icon.png b/src/plugins/qmldesigner/componentsplugin/images/item-icon.png Binary files differindex fc53d38ae7..4fa106118c 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/item-icon.png +++ b/src/plugins/qmldesigner/componentsplugin/images/item-icon.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/item-icon16.png b/src/plugins/qmldesigner/componentsplugin/images/item-icon16.png Binary files differindex 7d2d7a5050..fb2c9b2ed6 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/item-icon16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/item-icon16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/label.png b/src/plugins/qmldesigner/componentsplugin/images/label.png Binary files differindex 9c90cc4403..bc4cea1738 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/label.png +++ b/src/plugins/qmldesigner/componentsplugin/images/label.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/label16.png b/src/plugins/qmldesigner/componentsplugin/images/label16.png Binary files differindex b744ef0eea..236ad9b158 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/label16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/label16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/progressbar.png b/src/plugins/qmldesigner/componentsplugin/images/progressbar.png Binary files differindex b9c3ebf244..b137ef7beb 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/progressbar.png +++ b/src/plugins/qmldesigner/componentsplugin/images/progressbar.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/progressbar16.png b/src/plugins/qmldesigner/componentsplugin/images/progressbar16.png Binary files differindex 77ce17a478..60da065fc1 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/progressbar16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/progressbar16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/radiobutton.png b/src/plugins/qmldesigner/componentsplugin/images/radiobutton.png Binary files differindex 2b9aa4793b..7e3c28d5f4 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/radiobutton.png +++ b/src/plugins/qmldesigner/componentsplugin/images/radiobutton.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/radiobutton16.png b/src/plugins/qmldesigner/componentsplugin/images/radiobutton16.png Binary files differindex 923297a3ff..38fd6eb0b2 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/radiobutton16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/radiobutton16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/slider.png b/src/plugins/qmldesigner/componentsplugin/images/slider.png Binary files differindex d62d0b7af9..a3bcd2cd6c 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/slider.png +++ b/src/plugins/qmldesigner/componentsplugin/images/slider.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/slider16.png b/src/plugins/qmldesigner/componentsplugin/images/slider16.png Binary files differindex 104f648fe1..9b71fa55d6 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/slider16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/slider16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/sliderh.png b/src/plugins/qmldesigner/componentsplugin/images/sliderh.png Binary files differdeleted file mode 100644 index c0bb24596d..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/sliderh.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/sliderh16.png b/src/plugins/qmldesigner/componentsplugin/images/sliderh16.png Binary files differdeleted file mode 100644 index 94df1a0337..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/sliderh16.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/stack-layouts-icon-16px.png b/src/plugins/qmldesigner/componentsplugin/images/stack-layouts-icon-16px.png Binary files differnew file mode 100644 index 0000000000..3f7ab00c1d --- /dev/null +++ b/src/plugins/qmldesigner/componentsplugin/images/stack-layouts-icon-16px.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/stack-layouts-icon.png b/src/plugins/qmldesigner/componentsplugin/images/stack-layouts-icon.png Binary files differnew file mode 100644 index 0000000000..bbd6783cc5 --- /dev/null +++ b/src/plugins/qmldesigner/componentsplugin/images/stack-layouts-icon.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/tabbar.png b/src/plugins/qmldesigner/componentsplugin/images/tabbar.png Binary files differdeleted file mode 100644 index 5683dc4184..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/tabbar.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/tabbar16.png b/src/plugins/qmldesigner/componentsplugin/images/tabbar16.png Binary files differdeleted file mode 100644 index b91390fec9..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/tabbar16.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/tabbutton.png b/src/plugins/qmldesigner/componentsplugin/images/tabbutton.png Binary files differdeleted file mode 100644 index 28cca26326..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/tabbutton.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/tabbutton16.png b/src/plugins/qmldesigner/componentsplugin/images/tabbutton16.png Binary files differdeleted file mode 100644 index aee09a0a34..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/tabbutton16.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/textarea.png b/src/plugins/qmldesigner/componentsplugin/images/textarea.png Binary files differindex 388a5c5786..55a0c40d6b 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/textarea.png +++ b/src/plugins/qmldesigner/componentsplugin/images/textarea.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/textarea16.png b/src/plugins/qmldesigner/componentsplugin/images/textarea16.png Binary files differindex 736f646803..647517a1ad 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/textarea16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/textarea16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/textfield.png b/src/plugins/qmldesigner/componentsplugin/images/textfield.png Binary files differindex a5c77b3a72..d9f6ff03c7 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/textfield.png +++ b/src/plugins/qmldesigner/componentsplugin/images/textfield.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/textfield16.png b/src/plugins/qmldesigner/componentsplugin/images/textfield16.png Binary files differindex d3a8a52bd1..ced8ee86f9 100644 --- a/src/plugins/qmldesigner/componentsplugin/images/textfield16.png +++ b/src/plugins/qmldesigner/componentsplugin/images/textfield16.png diff --git a/src/plugins/qmldesigner/componentsplugin/images/toolbar.png b/src/plugins/qmldesigner/componentsplugin/images/toolbar.png Binary files differdeleted file mode 100644 index 91b335082d..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/toolbar.png +++ /dev/null diff --git a/src/plugins/qmldesigner/componentsplugin/images/toolbar16.png b/src/plugins/qmldesigner/componentsplugin/images/toolbar16.png Binary files differdeleted file mode 100644 index dd2d5af1cb..0000000000 --- a/src/plugins/qmldesigner/componentsplugin/images/toolbar16.png +++ /dev/null diff --git a/src/plugins/qmldesigner/designercore/include/bindingproperty.h b/src/plugins/qmldesigner/designercore/include/bindingproperty.h index 345dbf4514..a530cb203f 100644 --- a/src/plugins/qmldesigner/designercore/include/bindingproperty.h +++ b/src/plugins/qmldesigner/designercore/include/bindingproperty.h @@ -58,4 +58,7 @@ protected: bool compareBindingProperties(const QmlDesigner::BindingProperty &bindingProperty01, const QmlDesigner::BindingProperty &bindingProperty02); +QMLDESIGNERCORE_EXPORT QTextStream& operator<<(QTextStream &stream, const BindingProperty &property); +QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, const BindingProperty &AbstractProperty); + } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index 54489c3019..c0e9671315 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -48,10 +48,13 @@ #include <QCoreApplication> #include <QCryptographicHash> #include <QDateTime> +#include <QLoggingCategory> #include <QLibraryInfo> #include <QMessageBox> #include <QThread> +static Q_LOGGING_CATEGORY(puppetStart, "puppet.start") +static Q_LOGGING_CATEGORY(puppetBuild, "puppet.build") namespace QmlDesigner { @@ -379,7 +382,13 @@ QProcessEnvironment PuppetCreator::processEnvironment() const QStringList importPaths = m_model->importPaths(); if (m_availablePuppetType == FallbackPuppet) importPaths.append(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)); - environment.appendOrSet("QML2_IMPORT_PATH", importPaths.join(pathSep), pathSep); + if (m_availablePuppetType != FallbackPuppet) + environment.appendOrSet("QML2_IMPORT_PATH", importPaths.join(pathSep), pathSep); + + qCInfo(puppetStart) << Q_FUNC_INFO; + qCInfo(puppetStart) << "Puppet qrc mapping" << m_qrcMapping; + qCInfo(puppetStart) << "Puppet import paths:" << importPaths; + qCInfo(puppetStart) << "Puppet environment:" << environment.toStringList(); return environment.toProcessEnvironment(); } @@ -455,6 +464,9 @@ bool PuppetCreator::startBuildProcess(const QString &buildDirectoryPath, process.waitForFinished(); + qCInfo(puppetBuild) << Q_FUNC_INFO; + qCInfo(puppetBuild) << m_compileLog; + if (process.exitStatus() == QProcess::NormalExit && process.exitCode() == 0) return true; diff --git a/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp b/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp index 68b71da381..018075da66 100644 --- a/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp +++ b/src/plugins/qmldesigner/designercore/model/bindingproperty.cpp @@ -244,4 +244,22 @@ void BindingProperty::setDynamicTypeNameAndExpression(const TypeName &typeName, model()->d->setDynamicBindingProperty(internalNode(), name(), typeName, expression); } +QDebug operator<<(QDebug debug, const BindingProperty &property) +{ + if (!property.isValid()) + return debug.nospace() << "BindingProperty(" << PropertyName("invalid") << ')'; + else + return debug.nospace() << "BindingProperty(" << property.name() << " " << property.expression() << ')'; +} + +QTextStream& operator<<(QTextStream &stream, const BindingProperty &property) +{ + if (!property.isValid()) + stream << "BindingProperty(" << PropertyName("invalid") << ')'; + else + stream << "BindingProperty(" << property.name() << " " << property.expression() << ')'; + + return stream; +} + } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp index 47f4315aa7..72bfe1a78a 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp @@ -189,7 +189,7 @@ bool QmlObjectNode::isTranslatableText(const PropertyName &name) const if (modelNode().metaInfo().isValid() && modelNode().metaInfo().hasProperty(name)) if (modelNode().metaInfo().propertyTypeName(name) == "QString" || modelNode().metaInfo().propertyTypeName(name) == "string") { if (modelNode().hasBindingProperty(name)) { - static QRegExp regularExpressionPatter(QLatin1String("qsTr(|Id)\\((\".*\")\\)")); + static QRegExp regularExpressionPatter(QLatin1String("qsTr(?:|Id)\\((\".*\")\\)")); return regularExpressionPatter.exactMatch(modelNode().bindingProperty(name).expression()); } @@ -202,7 +202,7 @@ bool QmlObjectNode::isTranslatableText(const PropertyName &name) const QString QmlObjectNode::stripedTranslatableText(const PropertyName &name) const { if (modelNode().hasBindingProperty(name)) { - static QRegExp regularExpressionPatter(QLatin1String("qsTr(|Id)\\(\"(.*)\"\\)")); + static QRegExp regularExpressionPatter(QLatin1String("qsTr(?:|Id)\\(\"(.*)\"\\)")); if (regularExpressionPatter.exactMatch(modelNode().bindingProperty(name).expression())) return regularExpressionPatter.cap(1); } else { diff --git a/src/plugins/qmldesigner/documentwarningwidget.cpp b/src/plugins/qmldesigner/documentwarningwidget.cpp index 0c55a61835..d816db3264 100644 --- a/src/plugins/qmldesigner/documentwarningwidget.cpp +++ b/src/plugins/qmldesigner/documentwarningwidget.cpp @@ -52,6 +52,9 @@ DocumentWarningWidget::DocumentWarningWidget(QWidget *parent) , m_ignoreWarningsCheckBox(new QCheckBox(this)) , m_continueButton(new QPushButton(this)) { + // this "tooltip" should behave like a widget with parent child relation to the designer mode + setWindowFlags(Qt::Widget); + QFont boldFont = font(); boldFont.setBold(true); m_headerLabel->setFont(boldFont); diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp index 273d2ea977..11e03384fb 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp @@ -308,7 +308,7 @@ void BindingModel::updateExpression(int row) RewriterTransaction transaction = connectionView()->beginRewriterTransaction(QByteArrayLiteral("BindingModel::updateExpression")); try { - bindingProperty.setExpression(expression); + bindingProperty.setExpression(expression.trimmed()); transaction.commit(); //committing in the try block } catch (Exception &e) { m_exceptionError = e.description(); diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/delegates.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/delegates.cpp index 74fdd455ae..e53e2fc1c8 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/delegates.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/delegates.cpp @@ -71,6 +71,11 @@ void PropertiesComboBox::setText(const QString &text) setEditText(text); } +void PropertiesComboBox::disableValidator() +{ + setValidator(0); +} + ConnectionComboBox::ConnectionComboBox(QWidget *parent) : PropertiesComboBox(parent) { } @@ -163,6 +168,7 @@ QWidget *BindingDelegate::createEditor(QWidget *parent, const QStyleOptionViewIt } break; case BindingModel::SourcePropertyNameRow: { bindingComboBox->addItems(model->possibleSourceProperties(bindingProperty)); + bindingComboBox->disableValidator(); } break; default: qWarning() << "BindingDelegate::createEditor column" << index.column(); } diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/delegates.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/delegates.h index 640cc1f757..581e59c3f9 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/delegates.h +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/delegates.h @@ -42,6 +42,7 @@ public: virtual QString text() const; void setText(const QString &text); + void disableValidator(); }; class ConnectionComboBox : public PropertiesComboBox diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/stylesheet.css b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/stylesheet.css index d3e884ae03..a5c28cb18e 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/stylesheet.css +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/stylesheet.css @@ -8,6 +8,9 @@ QFrame QTableView { color: creatorTheme.PanelTextColorLight; + selection-color: creatorTheme.PanelTextColorLight; + selection-background-color: creatorTheme.QmlDesigner_HighlightColor; + } QTableView::item @@ -24,12 +27,9 @@ QTableView::item:focus QTableView::item:selected { - background-color: qlineargradient(x1: 0, y1: -0.4, x2: 0, y2: 0.6,stop: 0 palette(midlight), stop: 1 palette(highlight)); - border: none } - QHeaderView::section { background-color: #494949; padding: 4px; diff --git a/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.qbs b/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.qbs index 60f0711674..56f5a83d87 100644 --- a/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.qbs +++ b/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.qbs @@ -4,7 +4,7 @@ QtcProduct { name: "qtquickplugin" type: ["dynamiclibrary"] installDir: qtc.ide_plugin_path + '/' + installDirName - property string installDirName: qbs.targetOS.contains("osx") ? "QmlDesigner" : "qmldesigner" + property string installDirName: qbs.targetOS.contains("macos") ? "QmlDesigner" : "qmldesigner" cpp.defines: base.concat("QTQUICK_LIBRARY") cpp.includePaths: base.concat("../designercore/include") diff --git a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp index 830b7101e2..d6785f5f9b 100644 --- a/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp +++ b/src/plugins/qmlprofiler/tests/localqmlprofilerrunner_test.cpp @@ -37,17 +37,6 @@ LocalQmlProfilerRunnerTest::LocalQmlProfilerRunnerTest(QObject *parent) : QObjec { } -bool checkErrors(const QStringList &errors, int number) -{ - if (errors.length() != number) { - qDebug() << "Found unexpected errors:" << errors; - return false; - } else { - return true; - } -} - - void LocalQmlProfilerRunnerTest::testRunner() { Debugger::AnalyzerConnection connection; @@ -64,7 +53,6 @@ void LocalQmlProfilerRunnerTest::testRunner() bool running = false; int runCount = 0; - QStringList errors; auto connectRunner = [&]() { connect(runner, &LocalQmlProfilerRunner::started, this, [&running, &runCount](){ @@ -76,13 +64,6 @@ void LocalQmlProfilerRunnerTest::testRunner() QVERIFY(running); running = false; }); - - connect(runner, &LocalQmlProfilerRunner::appendMessage, this, - [&errors](const QString &message, Utils::OutputFormat format) { - if (format == Utils::ErrorMessageFormat && message != - ProjectExplorer::ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput()) - errors << message; - }); }; connectRunner(); @@ -91,7 +72,6 @@ void LocalQmlProfilerRunnerTest::testRunner() QTRY_COMPARE_WITH_TIMEOUT(runCount, 1, 10000); QTRY_VERIFY_WITH_TIMEOUT(!running, 10000); - QVERIFY(checkErrors(errors, 1)); configuration.socket = connection.analyzerSocket = LocalQmlProfilerRunner::findFreeSocket(); configuration.debuggee.executable = qApp->applicationFilePath(); @@ -109,7 +89,6 @@ void LocalQmlProfilerRunnerTest::testRunner() QTRY_COMPARE_WITH_TIMEOUT(runCount, 2, 10000); QTRY_VERIFY_WITH_TIMEOUT(!running, 10000); - QVERIFY(checkErrors(errors, 1)); delete rc; @@ -126,13 +105,8 @@ void LocalQmlProfilerRunnerTest::testRunner() rc->start(); QTRY_COMPARE_WITH_TIMEOUT(runCount, 3, 10000); - QTest::qWait(1000); - QVERIFY(running); // verify it doesn't spontaneously stop - QVERIFY(checkErrors(errors, 1)); - rc->stop(); QTRY_VERIFY_WITH_TIMEOUT(!running, 10000); - QVERIFY(checkErrors(errors, 2)); // "The program has unexpectedly finished." delete rc; } diff --git a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp index 3b5e14e1fa..1afd0b8451 100644 --- a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp @@ -170,7 +170,6 @@ QString GenericProposalModel::detail(int index) const return m_currentItems.at(index)->detail(); } -// make it optional because it is not needed in many cases void GenericProposalModel::removeDuplicates() { QHash<QString, quint64> unique; @@ -272,6 +271,11 @@ int GenericProposalModel::persistentId(int index) const return m_idByText.value(m_currentItems.at(index)->text()); } +bool GenericProposalModel::containsDuplicates() const +{ + return true; +} + bool GenericProposalModel::supportsPrefixExpansion() const { return true; diff --git a/src/plugins/texteditor/codeassist/genericproposalmodel.h b/src/plugins/texteditor/codeassist/genericproposalmodel.h index 07f04209fe..d3ff31fb6f 100644 --- a/src/plugins/texteditor/codeassist/genericproposalmodel.h +++ b/src/plugins/texteditor/codeassist/genericproposalmodel.h @@ -53,6 +53,7 @@ public: virtual QIcon icon(int index) const; virtual QString detail(int index) const; virtual int persistentId(int index) const; + virtual bool containsDuplicates() const; virtual void removeDuplicates(); virtual void filter(const QString &prefix); virtual bool isSortable(const QString &prefix) const; @@ -63,8 +64,6 @@ public: virtual AssistProposalItemInterface *proposalItem(int index) const; void loadContent(const QList<AssistProposalItemInterface *> &items); - void setSortingAllowed(bool isAllowed); - bool isSortingAllowed() const; protected: QList<AssistProposalItemInterface *> m_currentItems; diff --git a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp index 2da949edee..4a1e1eff67 100644 --- a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp @@ -407,7 +407,8 @@ void GenericProposalWidget::setIsSynchronized(bool isSync) void GenericProposalWidget::showProposal(const QString &prefix) { ensurePolished(); - d->m_model->removeDuplicates(); + if (d->m_model->containsDuplicates()) + d->m_model->removeDuplicates(); if (!updateAndCheck(prefix)) return; show(); diff --git a/src/plugins/texteditor/colorschemeedit.cpp b/src/plugins/texteditor/colorschemeedit.cpp index 198f03b11f..18b719ba2f 100644 --- a/src/plugins/texteditor/colorschemeedit.cpp +++ b/src/plugins/texteditor/colorschemeedit.cpp @@ -26,6 +26,8 @@ #include "colorschemeedit.h" #include "ui_colorschemeedit.h" +#include <utils/theme/theme.h> + #include <QAbstractListModel> #include <QColorDialog> @@ -148,6 +150,7 @@ ColorSchemeEdit::ColorSchemeEdit(QWidget *parent) : m_formatsModel(new FormatsModel(this)), m_readOnly(false) { + setPalette(Utils::Theme::initialPalette()); m_ui->setupUi(this); m_ui->itemList->setModel(m_formatsModel); diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp index 97865a404a..7357510abd 100644 --- a/src/plugins/texteditor/fontsettingspage.cpp +++ b/src/plugins/texteditor/fontsettingspage.cpp @@ -253,15 +253,17 @@ FormatDescription::FormatDescription(TextStyle id, QColor FormatDescription::defaultForeground(TextStyle id) { if (id == C_LINE_NUMBER) { - const QColor bg = QApplication::palette().background().color(); + const QPalette palette = Utils::Theme::initialPalette(); + const QColor bg = palette.background().color(); if (bg.value() < 128) - return QApplication::palette().foreground().color(); + return palette.foreground().color(); else - return QApplication::palette().dark().color(); + return palette.dark().color(); } else if (id == C_CURRENT_LINE_NUMBER) { - const QColor bg = QApplication::palette().background().color(); + const QPalette palette = Utils::Theme::initialPalette(); + const QColor bg = palette.background().color(); if (bg.value() < 128) - return QApplication::palette().foreground().color(); + return palette.foreground().color(); else return QColor(); } else if (id == C_PARENTHESES) { @@ -277,7 +279,7 @@ QColor FormatDescription::defaultBackground(TextStyle id) if (id == C_TEXT) { return Qt::white; } else if (id == C_LINE_NUMBER) { - return QApplication::palette().background().color(); + return Utils::Theme::initialPalette().background().color(); } else if (id == C_SEARCH_RESULT) { return QColor(0xffef0b); } else if (id == C_PARENTHESES) { @@ -287,7 +289,7 @@ QColor FormatDescription::defaultBackground(TextStyle id) } else if (id == C_AUTOCOMPLETE) { return QColor(192, 192, 255); } else if (id == C_CURRENT_LINE || id == C_SEARCH_SCOPE) { - const QPalette palette = QApplication::palette(); + const QPalette palette = Utils::Theme::initialPalette(); const QColor &fg = palette.color(QPalette::Highlight); const QColor &bg = palette.color(QPalette::Base); @@ -308,8 +310,7 @@ QColor FormatDescription::defaultBackground(TextStyle id) fg.blueF() * ratio + bg.blueF() * (1 - ratio)); return col; } else if (id == C_SELECTION) { - const QPalette palette = QApplication::palette(); - return palette.color(QPalette::Highlight); + return Utils::Theme::initialPalette().color(QPalette::Highlight); } else if (id == C_OCCURRENCES) { return QColor(180, 180, 180); } else if (id == C_OCCURRENCES_RENAME) { diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index d0a4209083..d7b75672dd 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -111,6 +111,7 @@ #include <QTimeLine> #include <QTimer> #include <QToolBar> +#include <QVBoxLayout> //#define DO_FOO @@ -5048,6 +5049,7 @@ void TextEditorWidget::showDefaultContextMenu(QContextMenuEvent *e, Id menuConte void TextEditorWidget::extraAreaLeaveEvent(QEvent *) { d->extraAreaPreviousMarkTooltipRequestedLine = -1; + ToolTip::hide(); // fake missing mouse move event from Qt QMouseEvent me(QEvent::MouseMove, QPoint(-1, -1), Qt::NoButton, 0, 0); @@ -5108,13 +5110,16 @@ void TextEditorWidget::extraAreaMouseEvent(QMouseEvent *e) int line = cursor.blockNumber() + 1; if (d->extraAreaPreviousMarkTooltipRequestedLine != line) { if (auto data = static_cast<TextBlockUserData *>(cursor.block().userData())) { - QStringList toolTips; - foreach (TextMark *mark, data->marks()) { - QString toolTip = mark->toolTip(); - if (!toolTip.isEmpty()) - toolTips.append(toolTip); + if (data->marks().isEmpty()) { + ToolTip::hide(); + } else { + auto layout = new QVBoxLayout; + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(2); + foreach (TextMark *mark, data->marks()) + mark->addToToolTipLayout(layout); + ToolTip::show(mapToGlobal(e->pos()), layout, this); } - ToolTip::show(mapToGlobal(e->pos()), toolTips.join('\n'), this); } } d->extraAreaPreviousMarkTooltipRequestedLine = line; diff --git a/src/plugins/texteditor/textmark.cpp b/src/plugins/texteditor/textmark.cpp index 5f879e8760..26f16b1b39 100644 --- a/src/plugins/texteditor/textmark.cpp +++ b/src/plugins/texteditor/textmark.cpp @@ -33,6 +33,8 @@ #include <coreplugin/documentmanager.h> #include <utils/qtcassert.h> +#include <QLayout> + using namespace Core; using namespace Utils; using namespace TextEditor::Internal; @@ -188,6 +190,12 @@ void TextMark::dragToLine(int lineNumber) Q_UNUSED(lineNumber); } +void TextMark::addToToolTipLayout(QLayout *target) +{ + if (!m_toolTip.isEmpty()) + target->addWidget(new QLabel(m_toolTip)); +} + TextDocument *TextMark::baseTextDocument() const { return m_baseTextDocument; diff --git a/src/plugins/texteditor/textmark.h b/src/plugins/texteditor/textmark.h index a7585e379d..bdbf799e74 100644 --- a/src/plugins/texteditor/textmark.h +++ b/src/plugins/texteditor/textmark.h @@ -33,6 +33,7 @@ #include <QIcon> QT_BEGIN_NAMESPACE +class QLayout; class QPainter; class QRect; class QTextBlock; @@ -73,6 +74,7 @@ public: virtual void clicked(); virtual bool isDraggable() const; virtual void dragToLine(int lineNumber); + virtual void addToToolTipLayout(QLayout *target); static Utils::Theme::Color categoryColor(Core::Id category); static bool categoryHasColor(Core::Id category); diff --git a/src/tools/3rdparty/iossim/iossim.qbs b/src/tools/3rdparty/iossim/iossim.qbs index 3c55f5f649..5a7f642563 100644 --- a/src/tools/3rdparty/iossim/iossim.qbs +++ b/src/tools/3rdparty/iossim/iossim.qbs @@ -2,7 +2,7 @@ import qbs 1.0 QtcTool { name: "iossim" - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") Depends { name: "bundle" } Depends { name: "Qt"; submodules: ["widgets"] } diff --git a/src/tools/3rdparty/iossim_1_8_2/iossim.qbs b/src/tools/3rdparty/iossim_1_8_2/iossim.qbs index ce138f7a20..f2537dad06 100644 --- a/src/tools/3rdparty/iossim_1_8_2/iossim.qbs +++ b/src/tools/3rdparty/iossim_1_8_2/iossim.qbs @@ -4,7 +4,7 @@ import QtcTool QtcTool { name: "iossim" - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") Depends { name: "Qt"; submodules: ["widgets"] } Depends { name: "app_version_header" } diff --git a/src/tools/clangbackend/clangbackend.qbs b/src/tools/clangbackend/clangbackend.qbs index 83684c17f9..7f154f963d 100644 --- a/src/tools/clangbackend/clangbackend.qbs +++ b/src/tools/clangbackend/clangbackend.qbs @@ -24,7 +24,7 @@ QtcTool { cpp.rpaths: base.concat(libclang.llvmLibDir) Properties { - condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("unix") && !qbs.targetOS.contains("macos") cpp.linkerFlags: base.concat(["-z", "origin"]) } } diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index b2be86e329..befc258e14 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -557,7 +557,28 @@ inkscape:groupmode="layer" id="layer6" inkscape:label="Tools logos" - style="display:inline" /> + style="display:inline"> + <g + id="src/libs/qmleditorwidgets/images/anchor_bottom" + transform="matrix(-1,0,0,-1,1228,1184)"> + <rect + id="rect5146" + height="16" + width="16" + y="584" + x="590" + style="display:inline;fill:#ffffff;fill-opacity:1" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchor_target_bar" + id="use5156-3" + transform="matrix(-1,0,0,-1,1196,1170)" + width="100%" + height="100%" /> + </g> + </g> <g inkscape:label="Other icons" inkscape:groupmode="layer" @@ -1006,7 +1027,7 @@ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> </g> <g - id="src/libs/extensionsystem/images/ok"> + id="src/libs/utils/images/ok"> <rect y="584" x="297" @@ -1022,7 +1043,7 @@ sodipodi:nodetypes="ccc" /> </g> <g - id="src/libs/extensionsystem/images/error" + id="src/libs/utils/images/error" transform="translate(2,0)"> <rect style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" @@ -1049,7 +1070,7 @@ </g> </g> <g - id="src/libs/extensionsystem/images/notloaded" + id="src/libs/utils/images/notloaded" transform="translate(8,0)"> <rect y="584" @@ -1240,6 +1261,287 @@ style="fill:#000000" id="path4400" /> </g> + <g + id="src/libs/qmleditorwidgets/images/anchoreditem"> + <rect + style="fill:#ffffff" + x="574" + y="584" + width="16" + height="16" + id="rect4723-6-8" /> + <rect + y="588.5" + x="577.5" + height="8" + width="8" + id="anchoreditemrect" + style="fill:#dbdbdb;stroke:#606060" + ry="1.5" /> + </g> + <g + id="src/libs/qmleditorwidgets/images/anchor_top"> + <rect + style="fill:#ffffff" + x="590" + y="584" + width="16" + height="16" + id="rect4723-6-8-2" /> + <rect + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + id="anchor_target_bar" + width="11" + height="1" + x="592" + y="585" /> + </g> + <g + id="src/libs/qmleditorwidgets/images/anchor_right" + transform="matrix(0,1,-1,0,1206,-6)"> + <rect + id="rect5140" + height="16" + width="16" + y="584" + x="590" + style="fill:#ffffff" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchor_target_bar" + id="use5156" + transform="translate(1,0)" + width="100%" + height="100%" /> + </g> + <g + id="src/libs/qmleditorwidgets/images/anchor_left" + transform="matrix(0,-1,1,0,55,1190)"> + <rect + id="rect5152" + height="16" + width="16" + y="583" + x="590" + style="fill:#ffffff" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchor_target_bar" + id="use5156-6" + transform="matrix(-1,0,0,-1,1195,1169)" + width="100%" + height="100%" /> + </g> + <g + style="display:inline" + id="src/libs/qmleditorwidgets/images/anchor_horizontal" + transform="matrix(0,-1,1,0,71,1190)"> + <rect + id="rect5152-4" + height="16" + width="16" + y="583" + x="590" + style="fill:#ffffff" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchor_target_bar" + id="use5156-6-3" + transform="matrix(-1,0,0,-1,1195,1176)" + width="100%" + height="100%" /> + </g> + <g + id="src/libs/qmleditorwidgets/images/anchor_vertical"> + <rect + transform="scale(1,-1)" + id="rect5152-4-0" + height="16" + width="16" + y="-600" + x="670" + style="fill:#ffffff" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchor_target_bar" + id="use5156-6-3-2" + transform="matrix(-1,0,0,1,1275,7)" + width="100%" + height="100%" /> + </g> + <g + style="display:inline" + id="src/libs/qmleditorwidgets/images/anchor_fill" + transform="matrix(0,1,-1,0,1286,-6)"> + <rect + id="rect5140-5" + height="16" + width="16" + y="584" + x="590" + style="fill:#ffffff" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchor_target_bar" + id="use5156-7" + transform="translate(1,0)" + width="100%" + height="100%" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchor_target_bar" + id="use5156-7-9" + width="100%" + height="100%" + transform="translate(1,14)" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchor_target_bar" + id="use5156-7-9-3" + width="100%" + height="100%" + transform="matrix(0,-1,1,0,6,1190)" /> + <use + transform="matrix(0,-1,1,0,20,1190)" + height="100%" + width="100%" + id="use5284" + xlink:href="#anchor_target_bar" + y="0" + x="0" + style="display:inline" /> + <rect + y="592" + x="-599" + height="13" + width="13" + id="rect5076-2" + style="fill:#dbdbdb" + transform="matrix(0,-1,1,0,0,0)" + ry="4" /> + <use + style="display:inline" + x="0" + y="0" + xlink:href="#anchoreditemrect" + id="use5093" + transform="matrix(0,-1,1,0,6,1174)" + width="100%" + height="100%" /> + </g> + <g + id="src/libs/qmleditorwidgets/images/alignment_left" + transform="translate(-39,0)"> + <rect + transform="matrix(0,1,-1,0,0,0)" + id="rect5140-5-1" + height="16" + width="16" + y="-757" + x="584" + style="display:inline;fill:#ffffff" /> + <path + style="color:#000000" + d="m 702,584 0,1 12,0 0,-1 -12,0 z m 0,3 0,1 14,0 0,-1 -14,0 z m 0,3 0,1 16,0 0,-1 -16,0 z m 0,3 0,1 10,0 0,-1 -10,0 z m 0,3 0,1 12,0 0,-1 -12,0 z m 0,3 0,1 16,0 0,-1 -16,0 z" + transform="translate(39,0)" + id="rect5116" + inkscape:connector-curvature="0" /> + </g> + <g + transform="translate(-23,0)" + id="src/libs/qmleditorwidgets/images/alignment_center"> + <rect + style="display:inline;fill:#ffffff" + x="584" + y="-757" + width="16" + height="16" + id="rect5154" + transform="matrix(0,1,-1,0,0,0)" /> + <path + id="rect5166" + style="color:#000000" + d="m 741,599 16,0 0,1 -16,0 z m 2,-3 12,0 0,1 -12,0 z m 1,-3 10,0 0,1 -10,0 z m -3,-3 16,0 0,1 -16,0 z m 1,-3 14,0 0,1 -14,0 z m 1,-3 12,0 0,1 -12,0 z" /> + </g> + <use + x="0" + y="0" + xlink:href="#src/libs/qmleditorwidgets/images/alignment_left" + id="src/libs/qmleditorwidgets/images/alignment_right" + transform="matrix(-1,0,0,1,1452,0)" + width="100%" + height="100%" /> + <g + style="display:inline" + id="src/libs/qmleditorwidgets/images/alignment_top" + transform="translate(9,0)"> + <rect + style="display:inline;fill:#ffffff" + x="584" + y="-757" + width="16" + height="16" + id="rect5154-0" + transform="matrix(0,1,-1,0,0,0)" /> + <path + inkscape:connector-curvature="0" + id="rect5166-5" + style="color:#000000" + d="m 742,585 14,0 0,1 -14,0 z" + sodipodi:nodetypes="ccccc" /> + </g> + <g + style="display:inline" + id="src/libs/qmleditorwidgets/images/alignment_middle" + transform="translate(25,0)"> + <rect + style="display:inline;fill:#ffffff" + x="584" + y="-757" + width="16" + height="16" + id="rect5154-0-3" + transform="matrix(0,1,-1,0,0,0)" /> + <path + inkscape:connector-curvature="0" + id="rect5166-5-0" + style="color:#000000" + d="m 742,592 14,0 0,1 -14,0 z" + sodipodi:nodetypes="ccccc" /> + </g> + <g + style="display:inline" + id="src/libs/qmleditorwidgets/images/alignment_bottom" + transform="translate(41,0)"> + <rect + style="display:inline;fill:#ffffff" + x="584" + y="-757" + width="16" + height="16" + id="rect5154-0-3-5" + transform="matrix(0,1,-1,0,0,0)" /> + <path + inkscape:connector-curvature="0" + id="rect5166-5-0-8" + style="color:#000000" + d="m 742,599 14,0 0,1 -14,0 z" + sodipodi:nodetypes="ccccc" /> + </g> </g> <g inkscape:groupmode="layer" @@ -5310,5 +5612,86 @@ id="rect5583" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-opacity:1" /> </g> + <g + id="src/libs/qmleditorwidgets/images/style_bold" + transform="translate(-4,0)"> + <rect + transform="matrix(0,1,-1,0,0,0)" + id="rect5154-0-3-5-8" + height="16" + width="16" + y="-818" + x="584" + style="fill:#ffffff" /> + <path + d="m 812.46641,591.10694 c 1.20962,0.28761 2.05886,0.63593 2.54771,1.04497 0.70195,0.58162 1.05292,1.3358 1.05292,2.26254 0,0.97787 -0.38544,1.78638 -1.15634,2.42552 C 813.96433,597.61331 812.58863,598 810.78359,598 l -6.47736,0 0,-0.35473 c 0.58915,0 0.98713,-0.0543 1.19395,-0.16295 0.21309,-0.11506 0.36038,-0.26208 0.44185,-0.44103 0.0878,-0.17894 0.13162,-0.61996 0.13162,-1.32301 l 0,-8.43655 c 0,-0.70304 -0.0438,-1.14406 -0.13162,-1.323 -0.0815,-0.18536 -0.22876,-0.33235 -0.44185,-0.44101 -0.21309,-0.10866 -0.61106,-0.16298 -1.19395,-0.16298 l 0,-0.35474 6.11073,0 c 1.46031,0 2.49444,0.13423 3.10238,0.40268 0.60794,0.26203 1.08738,0.6583 1.43835,1.18877 0.35098,0.52409 0.52647,1.08334 0.52647,1.67773 0,0.62635 -0.22249,1.1856 -0.66747,1.67775 -0.44499,0.48572 -1.22842,0.87239 -2.35028,1.16001 z m -3.45676,-0.25885 c 0.88999,0 1.57967,-0.10227 1.99959,-0.3068 0.42619,-0.2045 0.75209,-0.4921 0.9777,-0.86281 0.22564,-0.3707 0.33845,-0.84366 0.33845,-1.41888 0,-0.57522 -0.11281,-1.045 -0.33845,-1.4093 -0.21935,-0.37069 -0.53585,-0.6519 -0.9495,-0.84365 -0.41366,-0.19173 -1.11275,-0.2844 -2.02779,-0.27802 z m 0,0.74777 0,4.17036 -0.009,0.47936 c 0,0.34512 0.0845,0.60716 0.25383,0.78613 0.17549,0.17256 0.4672,0.25885 0.80563,0.25885 0.5014,0 0.96205,-0.11186 1.38196,-0.33557 0.4262,-0.23007 0.7521,-0.55922 0.97771,-0.98744 0.22564,-0.43462 0.33846,-0.91716 0.33846,-1.44765 0,-0.60718 -0.13789,-1.15044 -0.41365,-1.62978 -0.27577,-0.48575 -0.65496,-0.82449 -1.13755,-1.01623 -0.48258,-0.19173 -1.23807,-0.28441 -2.197,-0.27803 z" + style="fill:#000000" + id="path5133" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccscsccccssccccsccscccccsccccccccsccscccc" /> + </g> + <g + id="src/libs/qmleditorwidgets/images/style_italic" + transform="translate(-4,0)"> + <rect + style="fill:#ffffff" + x="584" + y="-834" + width="16" + height="16" + id="rect5154-0-3-5-8-1" + transform="matrix(0,1,-1,0,0,0)" /> + <path + d="M 827.03729,597.64527 826.93388,598 l -5.24582,0 0.13162,-0.35473 q 0.78968,-0.0191 1.04352,-0.13422 0.41366,-0.16298 0.61107,-0.45057 0.31024,-0.4506 0.63927,-1.61061 l 2.21867,-7.84216 q 0.28204,-0.97787 0.28204,-1.47639 0,-0.24925 -0.12222,-0.42182 -0.12221,-0.17257 -0.37605,-0.25885 -0.24443,-0.0959 -0.96831,-0.0959 L 825.26048,585 l 4.92617,0 -0.10339,0.35474 q -0.60167,-0.009 -0.89311,0.13421 -0.42305,0.19174 -0.64868,0.54645 -0.21623,0.35474 -0.56404,1.57227 l -2.20929,7.84216 q -0.30082,1.08334 -0.30082,1.38052 0,0.23966 0.11281,0.41226 0.12219,0.16295 0.37603,0.25883 0.26323,0.0864 1.08113,0.14379 z" + style="fill:#000000" + id="path5135" + inkscape:connector-curvature="0" /> + </g> + <g + id="src/libs/qmleditorwidgets/images/style_underline" + transform="translate(-4,0)"> + <rect + transform="matrix(0,1,-1,0,0,0)" + id="rect5154-0-3-5-8-1-9" + height="16" + width="16" + y="-850" + x="584" + style="fill:#ffffff" /> + <path + d="m 844.13746,585.36698 0,-0.34896 4.51251,0 0,0.34896 -0.47945,0 q -0.7521,0 -1.15634,0.63185 -0.1974,0.29235 -0.1974,1.35803 l 0,5.18696 q 0,1.92389 -0.38547,2.98957 -0.37603,1.05624 -1.49477,1.82015 -1.10934,0.75446 -3.02716,0.75446 -2.08703,0 -3.16817,-0.72618 -1.08113,-0.72615 -1.53238,-1.95217 -0.30085,-0.83934 -0.30085,-3.1499 l 0,-4.99831 q 0,-1.17886 -0.32903,-1.54667 -0.31963,-0.36779 -1.04352,-0.36779 l -0.47944,0 0,-0.34896 5.50904,0 0,0.34896 -0.48885,0 q -0.78972,0 -1.12813,0.49982 -0.23504,0.33951 -0.23504,1.41464 l 0,5.57359 q 0,0.74503 0.1316,1.707 0.14102,0.96194 0.49826,1.4995 0.35724,0.53756 1.02472,0.88648 0.67689,0.34895 1.6546,0.34895 1.25034,0 2.23747,-0.54701 0.98713,-0.54697 1.34436,-1.39574 0.36666,-0.85821 0.36666,-2.89525 l 0,-5.17752 q 0,-1.19774 -0.26325,-1.49952 -0.36663,-0.41494 -1.09053,-0.41494 l -0.47944,0 z" + style="fill:#000000" + id="path5137" + inkscape:connector-curvature="0" /> + <path + inkscape:connector-curvature="0" + id="rect5166-5-0-3" + style="fill:#000000" + d="m 835,599 14,0 0,1 -14,0 z" + sodipodi:nodetypes="ccccc" /> + </g> + <g + id="src/libs/qmleditorwidgets/images/style_strikeout" + transform="translate(-4,0)"> + <rect + transform="matrix(0,1,-1,0,0,0)" + id="rect5154-0-3-5-8-1-6" + height="16" + width="16" + y="-866" + x="584" + style="fill:#ffffff" /> + <path + d="m 861.87219,584.82307 0,4.40196 -0.34784,0 q -0.16924,-1.26707 -0.61108,-2.01796 -0.43244,-0.75086 -1.24094,-1.19197 -0.8085,-0.44116 -1.6734,-0.44116 -0.97771,0 -1.61699,0.60069 -0.63927,0.59132 -0.63927,1.35156 0,0.58193 0.40425,1.06061 0.58287,0.70392 2.77333,1.87718 1.7862,0.95735 2.43486,1.47355 0.65809,0.50685 1.00592,1.2014 0.35727,0.69455 0.35727,1.45481 0,1.44541 -1.12814,2.49662 -1.11874,1.04183 -2.88615,1.04183 -0.55467,0 -1.04353,-0.0844 -0.29143,-0.0467 -1.21273,-0.33788 -0.91191,-0.30034 -1.15632,-0.30034 -0.23506,0 -0.37608,0.14077 -0.1316,0.14078 -0.1974,0.58193 l -0.34785,0 0,-4.36442 0.34785,0 q 0.24443,1.37033 0.65807,2.0555 0.41366,0.67579 1.25976,1.1263 0.85549,0.45053 1.87081,0.45053 1.17516,0 1.85202,-0.61947 0.68628,-0.61947 0.68628,-1.46419 0,-0.46929 -0.26323,-0.94797 -0.25383,-0.47868 -0.7991,-0.89166 -0.36665,-0.28156 -2.00245,-1.19198 -1.63577,-0.91982 -2.33146,-1.46421 -0.68627,-0.54437 -1.04351,-1.20139 -0.35725,-0.657 -0.35725,-1.44541 0,-1.37033 1.05291,-2.35585 1.05292,-0.99489 2.67931,-0.99489 1.01534,0 2.15287,0.49745 0.52646,0.23464 0.7427,0.23464 0.24442,0 0.39483,-0.14078 0.15983,-0.15017 0.25384,-0.59131 l 0.34784,0 z" + style="fill:#000000" + id="path5139" + inkscape:connector-curvature="0" /> + <path + inkscape:connector-curvature="0" + id="rect5166-5-0-3-3" + style="fill:#000000" + d="m 852,591 13,0 0,1 -13,0 z" + sodipodi:nodetypes="ccccc" /> + </g> </g> </svg> diff --git a/src/tools/iostool/iostool.qbs b/src/tools/iostool/iostool.qbs index 53fc2b74e3..b06d996e00 100644 --- a/src/tools/iostool/iostool.qbs +++ b/src/tools/iostool/iostool.qbs @@ -2,7 +2,7 @@ import qbs 1.0 QtcTool { name: "iostool" - condition: qbs.targetOS.contains("osx") + condition: qbs.targetOS.contains("macos") Depends { name: "bundle" } Depends { name: "Qt.widgets" } diff --git a/src/tools/qml2puppet/qml2puppet.qbs b/src/tools/qml2puppet/qml2puppet.qbs index 0395e8b777..e5fe8f44d7 100644 --- a/src/tools/qml2puppet/qml2puppet.qbs +++ b/src/tools/qml2puppet/qml2puppet.qbs @@ -3,7 +3,7 @@ import QtcFunctions QtcTool { name: "qml2puppet" - installDir: qbs.targetOS.contains("osx") + installDir: qbs.targetOS.contains("macos") ? qtc.ide_libexec_path + "/qmldesigner" : qtc.ide_libexec_path Depends { name: "bundle" } diff --git a/src/tools/sdktool/sdktool.qbs b/src/tools/sdktool/sdktool.qbs index be97b82750..a031232aba 100644 --- a/src/tools/sdktool/sdktool.qbs +++ b/src/tools/sdktool/sdktool.qbs @@ -7,7 +7,7 @@ QtcTool { Depends { name: "Utils" } Depends { name: "app_version_header" } - cpp.defines: base.concat([qbs.targetOS.contains("osx") + cpp.defines: base.concat([qbs.targetOS.contains("macos") ? 'DATA_PATH="."' : qbs.targetOS.contains("windows") ? 'DATA_PATH="../share/qtcreator"' : 'DATA_PATH="../../share/qtcreator"']) diff --git a/tests/manual/proparser/main.cpp b/tests/manual/proparser/main.cpp index 4555383b7b..60067fd92d 100644 --- a/tests/manual/proparser/main.cpp +++ b/tests/manual/proparser/main.cpp @@ -189,6 +189,8 @@ int main(int argc, char **argv) qCritical("usage: testreader [-v] [-d [-d]] [-c] <filenme> [<out_pwd>] [<variable assignments>]"); return 3; } + option.commitCommandLineArguments(state); + option.useEnvironment(); if (out_pwd.isEmpty()) out_pwd = in_pwd; option.setDirectories(in_pwd, out_pwd); diff --git a/tests/manual/qml/testprojects/directoryimport/directory/MyComponent.qml b/tests/manual/qml/testprojects/directoryimport/directory/MyComponent.qml new file mode 100644 index 0000000000..4af155d3b9 --- /dev/null +++ b/tests/manual/qml/testprojects/directoryimport/directory/MyComponent.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.3 +import QtQuick.Controls 1.2 +import QtQuick.Window 2.2 + +Rectangle { + width: 20 + height: 20 + color: "#2630de" +} diff --git a/tests/manual/qml/testprojects/directoryimport/directoryimport.qml b/tests/manual/qml/testprojects/directoryimport/directoryimport.qml new file mode 100644 index 0000000000..40ae676513 --- /dev/null +++ b/tests/manual/qml/testprojects/directoryimport/directoryimport.qml @@ -0,0 +1,38 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.3 +import "directory" + +Item { + + width: 640 + height: 480 + + MyComponent { + + + } +} diff --git a/tests/manual/qml/testprojects/directoryimport/directoryimport.qmlproject b/tests/manual/qml/testprojects/directoryimport/directoryimport.qmlproject new file mode 100644 index 0000000000..0d3f618138 --- /dev/null +++ b/tests/manual/qml/testprojects/directoryimport/directoryimport.qmlproject @@ -0,0 +1,20 @@ +/* File generated by Qt Creator */ + +import QmlProject 1.1 + +Project { + mainFile: "plugins.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + importPaths: [ "imports" ] +} diff --git a/tests/system/README b/tests/system/README index d84b30fa8b..953f0d953d 100644 --- a/tests/system/README +++ b/tests/system/README @@ -9,9 +9,9 @@ On Linux/Mac this is ~/QtSDK, and on Windows this is C:\QtSDK. After installing the QtSDK you should use the package manager of the QtSDK (SDKMaintenanceTool) to add some more packages. You'll need at least Desktop Qt versions 4.7.4, 4.8.0, Harmattan stuff (except QEmu), Maemo Toolchain, Qt Examples, Simulator, Documentation files. -Third - some of the test suites/test cases expect Qt 5.2.1 (default toolchain), Qt 5.3.1 (default toolchain) and Qt 5.4.1 (gcc, Linux and Windows only) +Third - some of the test suites/test cases expect Qt 5.3.1 (default toolchain), Qt 5.4.1 (gcc, Linux and Windows only) and Qt 5.6.1-1 (default toolchain) installed in their default locations. On Linux/Mac this is ~/Qt5.x.1 and on Windows this is C:\Qt\Qt5.x.1. The default toolchains are gcc on Linux, -clang on Mac and MSVC2010 on Windows. +clang on Mac and MSVC2010 (Qt <= 5.5) or MSVC2013 (Qt > 5.5) on Windows. It's easiest to use default installations of the official opensource Qt packages. Fourth - you'll have to provide some additional repositories (and for the hooking into subprocesses even some more Squish bundles, see below). These additional repositories are located inside ~/QtSDK/src or C:\QtSDK\src (depending on the OS you're on). diff --git a/tests/system/objects.map b/tests/system/objects.map index 9c78f4ec13..b3a313a085 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -164,6 +164,7 @@ :Qt Creator_SearchResult_Core::Internal::OutputPaneToggleButton {occurrence='2' type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_SystemSettings.Details_Utils::DetailsButton {occurrence='4' text='Details' type='Utils::DetailsButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_TextEditor::TextEditorWidget {type='TextEditor::TextEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator_Utils::BuildDirectoryLineEdit {occurrence='2' type='Utils::FancyLineEdit' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Utils::NavigationTreeView {type='Utils::NavigationTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Utils::NavigationTreeView::QExpandingLineEdit {container=':Qt Creator_Utils::NavigationTreeView' type='QExpandingLineEdit' unnamed='1' visible='1'} :Qt Gui Application.Form file:_QLabel {name='formLabel' text='Form file:' type='QLabel' visible='1' window=':Qt Gui Application_QmakeProjectManager::Internal::GuiAppWizardDialog'} diff --git a/tests/system/settings/mac/QtProject/qtcreator/profiles.xml b/tests/system/settings/mac/QtProject/qtcreator/profiles.xml index ca971e6011..124113a265 100644 --- a/tests/system/settings/mac/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/mac/QtProject/qtcreator/profiles.xml @@ -125,7 +125,7 @@ <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value> <value type="QString" key="PE.Profile.Id">{fc5f34fd-e703-4f4c-85ce-ea5bf5869e6a}</value> <valuelist type="QVariantList" key="PE.Profile.MutableInfo"/> - <value type="QString" key="PE.Profile.Name">Desktop 521 default</value> + <value type="QString" key="PE.Profile.Name">Desktop 561 default</value> <value type="bool" key="PE.Profile.SDK">false</value> <valuelist type="QVariantList" key="PE.Profile.StickyInfo"/> </valuemap> @@ -180,7 +180,7 @@ </data> <data> <variable>Profile.Default</variable> - <value type="QString">{fc5f34fd-e703-4f4c-85ce-ea5bf5869e6a}</value> + <value type="QString">{a1e860d1-c241-4abf-80fe-cf0c9f0a43b3}</value> </data> <data> <variable>Version</variable> diff --git a/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml b/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml index 941d0cac12..909dcb9eee 100644 --- a/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/mac/QtProject/qtcreator/qtversion.xml @@ -56,8 +56,8 @@ <variable>QtVersion.5</variable> <valuemap type="QVariantMap"> <value type="int" key="Id">9</value> - <value type="QString" key="Name">Desktop Qt 5.2.1 (SQUISH_DEFAULT_COMPILER)</value> - <value type="QString" key="QMakePath">~/Qt5.2.1/5.2.1/SQUISH_DEFAULT_COMPILER/bin/qmake</value> + <value type="QString" key="Name">Desktop Qt 5.6.1 (SQUISH_DEFAULT_COMPILER)</value> + <value type="QString" key="QMakePath">~/Qt5.6.1/5.6/SQUISH_DEFAULT_COMPILER/bin/qmake</value> <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value> <value type="bool" key="isAutodetected">false</value> </valuemap> diff --git a/tests/system/settings/unix/QtProject/qtcreator/profiles.xml b/tests/system/settings/unix/QtProject/qtcreator/profiles.xml index 5e08ff946d..6526ccdc57 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/profiles.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProfiles> -<!-- Written by QtCreator 3.3.81, 2015-02-18T14:20:56. --> +<!-- Written by QtCreator 4.0.83, 2016-07-21T11:54:33. --> <qtcreator> <data> <variable>Profile.0</variable> @@ -111,7 +111,6 @@ <variable>Profile.5</variable> <valuemap type="QVariantMap"> <value type="bool" key="PE.Profile.AutoDetected">false</value> - <value type="QString" key="PE.Profile.AutoDetectionSource"></value> <valuemap type="QVariantMap" key="PE.Profile.Data"> <value type="QString" key="Android.GdbServer.Information"></value> <value type="QString" key="Debugger.Information">{70e26273-2c0b-4534-bbc0-eb6ca670821a}</value> @@ -120,20 +119,20 @@ <value type="QString" key="PE.Profile.SysRoot"></value> <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371}</value> <value type="QString" key="QtPM4.mkSpecInformation"></value> - <value type="int" key="QtSupport.QtInformation">9</value> + <value type="int" key="QtSupport.QtInformation">2</value> </valuemap> <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value> - <value type="QString" key="PE.Profile.Id">{17ae70be-817d-4019-9337-fa7761c4b0ed}</value> + <value type="QString" key="PE.Profile.Id">{1dcb5509-1670-470d-80a5-8a988f36e4e2}</value> <valuelist type="QVariantList" key="PE.Profile.MutableInfo"/> - <value type="QString" key="PE.Profile.Name">Desktop 521 default</value> + <value type="QString" key="PE.Profile.Name">Desktop 480 GCC</value> <value type="bool" key="PE.Profile.SDK">false</value> - <valuelist type="QVariantList" key="PE.Profile.StickyInfo"/> </valuemap> </data> <data> <variable>Profile.6</variable> <valuemap type="QVariantMap"> <value type="bool" key="PE.Profile.AutoDetected">false</value> + <value type="QString" key="PE.Profile.AutoDetectionSource"></value> <valuemap type="QVariantMap" key="PE.Profile.Data"> <value type="QString" key="Android.GdbServer.Information"></value> <value type="QString" key="Debugger.Information">{70e26273-2c0b-4534-bbc0-eb6ca670821a}</value> @@ -142,13 +141,14 @@ <value type="QString" key="PE.Profile.SysRoot"></value> <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371}</value> <value type="QString" key="QtPM4.mkSpecInformation"></value> - <value type="int" key="QtSupport.QtInformation">2</value> + <value type="int" key="QtSupport.QtInformation">11</value> </valuemap> <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value> - <value type="QString" key="PE.Profile.Id">{1dcb5509-1670-470d-80a5-8a988f36e4e2}</value> + <value type="QString" key="PE.Profile.Id">{e91398ba-6443-4b02-b416-782a70d9df90}</value> <valuelist type="QVariantList" key="PE.Profile.MutableInfo"/> - <value type="QString" key="PE.Profile.Name">Desktop 480 GCC</value> + <value type="QString" key="PE.Profile.Name">Desktop 531 default</value> <value type="bool" key="PE.Profile.SDK">false</value> + <valuelist type="QVariantList" key="PE.Profile.StickyInfo"/> </valuemap> </data> <data> @@ -161,15 +161,16 @@ <value type="QString" key="Debugger.Information">{70e26273-2c0b-4534-bbc0-eb6ca670821a}</value> <value type="QString" key="PE.Profile.Device">Desktop Device</value> <value type="QByteArray" key="PE.Profile.DeviceType">Desktop</value> + <valuelist type="QVariantList" key="PE.Profile.Environment"/> <value type="QString" key="PE.Profile.SysRoot"></value> <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371}</value> <value type="QString" key="QtPM4.mkSpecInformation"></value> - <value type="int" key="QtSupport.QtInformation">11</value> + <value type="int" key="QtSupport.QtInformation">13</value> </valuemap> <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value> - <value type="QString" key="PE.Profile.Id">{e91398ba-6443-4b02-b416-782a70d9df90}</value> + <value type="QString" key="PE.Profile.Id">{8ca91e21-c12e-4876-85b3-4b2141708acb}</value> <valuelist type="QVariantList" key="PE.Profile.MutableInfo"/> - <value type="QString" key="PE.Profile.Name">Desktop 531 default</value> + <value type="QString" key="PE.Profile.Name">Desktop 541 GCC</value> <value type="bool" key="PE.Profile.SDK">false</value> <valuelist type="QVariantList" key="PE.Profile.StickyInfo"/> </valuemap> @@ -188,12 +189,12 @@ <value type="QString" key="PE.Profile.SysRoot"></value> <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371}</value> <value type="QString" key="QtPM4.mkSpecInformation"></value> - <value type="int" key="QtSupport.QtInformation">13</value> + <value type="int" key="QtSupport.QtInformation">15</value> </valuemap> <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value> - <value type="QString" key="PE.Profile.Id">{8ca91e21-c12e-4876-85b3-4b2141708acb}</value> + <value type="QString" key="PE.Profile.Id">{542217c7-ce0f-48f7-843b-d4fad339688d}</value> <valuelist type="QVariantList" key="PE.Profile.MutableInfo"/> - <value type="QString" key="PE.Profile.Name">Desktop 541 GCC</value> + <value type="QString" key="PE.Profile.Name">Desktop 561 default</value> <value type="bool" key="PE.Profile.SDK">false</value> <valuelist type="QVariantList" key="PE.Profile.StickyInfo"/> </valuemap> @@ -204,7 +205,7 @@ </data> <data> <variable>Profile.Default</variable> - <value type="QString">{17ae70be-817d-4019-9337-fa7761c4b0ed}</value> + <value type="QString">{e91398ba-6443-4b02-b416-782a70d9df90}</value> </data> <data> <variable>Version</variable> diff --git a/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml b/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml index ce7e0515a4..df6caa8842 100644 --- a/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/unix/QtProject/qtcreator/qtversion.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorQtVersions> -<!-- Written by QtCreator 3.3.81, 2015-02-18T14:20:56. --> +<!-- Written by QtCreator 4.0.83, 2016-07-21T11:54:33. --> <qtcreator> <data> <variable>QtVersion.0</variable> @@ -55,9 +55,9 @@ <data> <variable>QtVersion.5</variable> <valuemap type="QVariantMap"> - <value type="int" key="Id">9</value> - <value type="QString" key="Name">Desktop Qt 5.2.1 (SQUISH_DEFAULT_COMPILER)</value> - <value type="QString" key="QMakePath">~/Qt5.2.1/5.2.1/SQUISH_DEFAULT_COMPILER/bin/qmake</value> + <value type="int" key="Id">11</value> + <value type="QString" key="Name">Qt 5.3.1 (SQUISH_DEFAULT_COMPILER)</value> + <value type="QString" key="QMakePath">~/Qt5.3.1/5.3/SQUISH_DEFAULT_COMPILER/bin/qmake</value> <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value> <value type="bool" key="isAutodetected">false</value> </valuemap> @@ -65,9 +65,9 @@ <data> <variable>QtVersion.6</variable> <valuemap type="QVariantMap"> - <value type="int" key="Id">11</value> - <value type="QString" key="Name">Qt 5.3.1 (SQUISH_DEFAULT_COMPILER)</value> - <value type="QString" key="QMakePath">~/Qt5.3.1/5.3/SQUISH_DEFAULT_COMPILER/bin/qmake</value> + <value type="int" key="Id">13</value> + <value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value> + <value type="QString" key="QMakePath">~/Qt5.4.1/5.4/SQUISH_DEFAULT_COMPILER/bin/qmake</value> <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value> <value type="bool" key="isAutodetected">false</value> </valuemap> @@ -75,9 +75,9 @@ <data> <variable>QtVersion.7</variable> <valuemap type="QVariantMap"> - <value type="int" key="Id">13</value> + <value type="int" key="Id">15</value> <value type="QString" key="Name">Qt %{Qt:Version} (SQUISH_DEFAULT_COMPILER)</value> - <value type="QString" key="QMakePath">~/Qt5.4.1/5.4/SQUISH_DEFAULT_COMPILER/bin/qmake</value> + <value type="QString" key="QMakePath">~/Qt5.6.1/5.6/SQUISH_DEFAULT_COMPILER/bin/qmake</value> <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value> <value type="bool" key="isAutodetected">false</value> </valuemap> diff --git a/tests/system/settings/windows/QtProject/qtcreator/profiles.xml b/tests/system/settings/windows/QtProject/qtcreator/profiles.xml index 85edff2f66..ace7dc6199 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/profiles.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/profiles.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProfiles> -<!-- Written by QtCreator 3.3.81, 2015-02-20T13:29:04. --> +<!-- Written by QtCreator 4.0.83, 2016-07-20T17:07:18. --> <qtcreator> <data> <variable>Profile.0</variable> @@ -147,19 +147,19 @@ <value type="QString" key="PE.Profile.AutoDetectionSource"></value> <valuemap type="QVariantMap" key="PE.Profile.Data"> <value type="QString" key="Android.GdbServer.Information"></value> - <value type="QString" key="Debugger.Information">{811977c9-ea95-4616-bc28-c66d1935ff65}</value> + <value type="QString" key="Debugger.Information">{2f8a1f59-ddd7-49f0-ae61-1337223f56a3}</value> <value type="QString" key="PE.Profile.Device">Desktop Device</value> <value type="QByteArray" key="PE.Profile.DeviceType">Desktop</value> <valuelist type="QVariantList" key="PE.Profile.Environment"/> <value type="QString" key="PE.Profile.SysRoot"></value> - <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Msvc:{1186dad9-c485-4f69-b7e1-aff54c89ecb2}</value> + <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Mingw:{44d54392-22ee-4eac-a9f1-2d882ba8a7bb}</value> <value type="QString" key="QtPM4.mkSpecInformation"></value> - <value type="int" key="QtSupport.QtInformation">4</value> + <value type="int" key="QtSupport.QtInformation">22</value> </valuemap> <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value> - <value type="QString" key="PE.Profile.Id">{11e4aad3-9fa6-48a2-93f5-829471bfda32}</value> + <value type="QString" key="PE.Profile.Id">{10cf33c5-e36d-4a49-a8c7-086f3cf59695}</value> <valuelist type="QVariantList" key="PE.Profile.MutableInfo"/> - <value type="QString" key="PE.Profile.Name">Desktop 521 default</value> + <value type="QString" key="PE.Profile.Name">Desktop 541 GCC</value> <value type="bool" key="PE.Profile.SDK">false</value> <valuelist type="QVariantList" key="PE.Profile.StickyInfo"/> </valuemap> @@ -171,19 +171,19 @@ <value type="QString" key="PE.Profile.AutoDetectionSource"></value> <valuemap type="QVariantMap" key="PE.Profile.Data"> <value type="QString" key="Android.GdbServer.Information"></value> - <value type="QString" key="Debugger.Information">{2f8a1f59-ddd7-49f0-ae61-1337223f56a3}</value> + <value type="QString" key="Debugger.Information">{811977c9-ea95-4616-bc28-c66d1935ff65}</value> <value type="QString" key="PE.Profile.Device">Desktop Device</value> <value type="QByteArray" key="PE.Profile.DeviceType">Desktop</value> <valuelist type="QVariantList" key="PE.Profile.Environment"/> <value type="QString" key="PE.Profile.SysRoot"></value> - <value type="QString" key="PE.Profile.ToolChain">ProjectExplorer.ToolChain.Mingw:{44d54392-22ee-4eac-a9f1-2d882ba8a7bb}</value> + <value type="QString" key="PE.Profile.ToolChain">{7ca0887f-a9a5-4251-aba6-560a15595d20}</value> <value type="QString" key="QtPM4.mkSpecInformation"></value> - <value type="int" key="QtSupport.QtInformation">22</value> + <value type="int" key="QtSupport.QtInformation">24</value> </valuemap> <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value> - <value type="QString" key="PE.Profile.Id">{10cf33c5-e36d-4a49-a8c7-086f3cf59695}</value> + <value type="QString" key="PE.Profile.Id">{f9c7858c-d167-4b78-847a-91943bd0af07}</value> <valuelist type="QVariantList" key="PE.Profile.MutableInfo"/> - <value type="QString" key="PE.Profile.Name">Desktop 541 GCC</value> + <value type="QString" key="PE.Profile.Name">Desktop 561 default</value> <value type="bool" key="PE.Profile.SDK">false</value> <valuelist type="QVariantList" key="PE.Profile.StickyInfo"/> </valuemap> @@ -194,7 +194,7 @@ </data> <data> <variable>Profile.Default</variable> - <value type="QString">{11e4aad3-9fa6-48a2-93f5-829471bfda32}</value> + <value type="QString">{6a95566e-8372-4372-8286-ef73af7de191}</value> </data> <data> <variable>Version</variable> diff --git a/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml b/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml index 66d48d5f94..a517d266d5 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/qtversion.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorQtVersions> -<!-- Written by QtCreator 3.3.81, 2015-02-17T18:11:11. --> +<!-- Written by QtCreator 4.0.83, 2016-07-20T17:07:18. --> <qtcreator> <data> <variable>QtVersion.0</variable> @@ -55,9 +55,9 @@ <data> <variable>QtVersion.5</variable> <valuemap type="QVariantMap"> - <value type="int" key="Id">4</value> - <value type="QString" key="Name">Desktop Qt 5.2.1 (msvc2010)</value> - <value type="QString" key="QMakePath">C:/Qt/Qt5.2.1/5.2.1/msvc2010/bin/qmake.exe</value> + <value type="int" key="Id">20</value> + <value type="QString" key="Name">Qt 5.3.1 (msvc2010_opengl)</value> + <value type="QString" key="QMakePath">C:/Qt/Qt5.3.1/5.3/msvc2010_opengl/bin/qmake.exe</value> <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value> <value type="bool" key="isAutodetected">false</value> </valuemap> @@ -65,9 +65,9 @@ <data> <variable>QtVersion.6</variable> <valuemap type="QVariantMap"> - <value type="int" key="Id">20</value> - <value type="QString" key="Name">Qt 5.3.1 (msvc2010_opengl)</value> - <value type="QString" key="QMakePath">C:/Qt/Qt5.3.1/5.3/msvc2010_opengl/bin/qmake.exe</value> + <value type="int" key="Id">22</value> + <value type="QString" key="Name">Qt %{Qt:Version} (mingw491_32)</value> + <value type="QString" key="QMakePath">C:/Qt/Qt5.4.1/5.4/mingw491_32/bin/qmake.exe</value> <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value> <value type="bool" key="isAutodetected">false</value> </valuemap> @@ -75,9 +75,9 @@ <data> <variable>QtVersion.7</variable> <valuemap type="QVariantMap"> - <value type="int" key="Id">22</value> - <value type="QString" key="Name">Qt %{Qt:Version} (mingw491_32)</value> - <value type="QString" key="QMakePath">C:/Qt/Qt5.4.1/5.4/mingw491_32/bin/qmake.exe</value> + <value type="int" key="Id">24</value> + <value type="QString" key="Name">Qt %{Qt:Version} (msvc2013)</value> + <value type="QString" key="QMakePath">C:/Qt/Qt5.6.1/5.6/msvc2013/bin/qmake.exe</value> <value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value> <value type="bool" key="isAutodetected">false</value> </valuemap> diff --git a/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml b/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml index f87f81d9a5..027bed7ed1 100644 --- a/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml +++ b/tests/system/settings/windows/QtProject/qtcreator/toolchains.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorToolChains> -<!-- Written by QtCreator 3.3.81, 2015-02-20T13:29:04. --> +<!-- Written by QtCreator 4.0.83, 2016-07-20T17:07:18. --> <qtcreator> <data> <variable>ToolChain.0</variable> @@ -70,8 +70,19 @@ </valuemap> </data> <data> + <variable>ToolChain.5</variable> + <valuemap type="QVariantMap"> + <value type="QString" key="ProjectExplorer.MsvcToolChain.SupportedAbi">x86-windows-msvc2013-pe-32bit</value> + <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBat">C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/vcvarsall.bat</value> + <value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBatArg">x86</value> + <value type="bool" key="ProjectExplorer.ToolChain.Autodetect">true</value> + <value type="QString" key="ProjectExplorer.ToolChain.DisplayName">Microsoft Visual C++ Compiler 12.0 (x86)</value> + <value type="QString" key="ProjectExplorer.ToolChain.Id">ProjectExplorer.ToolChain.Msvc:{7ca0887f-a9a5-4251-aba6-560a15595d20}</value> + </valuemap> + </data> + <data> <variable>ToolChain.Count</variable> - <value type="int">5</value> + <value type="int">6</value> </data> <data> <variable>Version</variable> diff --git a/tests/system/shared/classes.py b/tests/system/shared/classes.py index 2e9b0bebae..b8e02f5663 100644 --- a/tests/system/shared/classes.py +++ b/tests/system/shared/classes.py @@ -34,11 +34,9 @@ class Targets: DESKTOP_480_DEFAULT, SIMULATOR, EMBEDDED_LINUX, - DESKTOP_521_DEFAULT, DESKTOP_531_DEFAULT, - DESKTOP_541_GCC) = ALL_TARGETS - - DESKTOP_561_DEFAULT = sum(ALL_TARGETS) + 1 + DESKTOP_541_GCC, + DESKTOP_561_DEFAULT) = ALL_TARGETS @staticmethod def desktopTargetClasses(): @@ -65,8 +63,6 @@ class Targets: return "Qt Simulator" elif target == Targets.EMBEDDED_LINUX: return "Embedded Linux" - elif target == Targets.DESKTOP_521_DEFAULT: - return "Desktop 521 default" elif target == Targets.DESKTOP_531_DEFAULT: return "Desktop 531 default" elif target == Targets.DESKTOP_541_GCC: @@ -96,7 +92,7 @@ class Targets: @staticmethod def getDefaultKit(): - return Targets.DESKTOP_521_DEFAULT + return Targets.DESKTOP_531_DEFAULT # this class holds some constants for easier usage inside the Projects view class ProjectSettings: @@ -182,7 +178,7 @@ class Qt5Path: @staticmethod def getPaths(pathSpec): - qt5targets = [Targets.DESKTOP_521_DEFAULT, Targets.DESKTOP_531_DEFAULT] + qt5targets = [Targets.DESKTOP_531_DEFAULT, Targets.DESKTOP_561_DEFAULT] if platform.system() != 'Darwin': qt5targets.append(Targets.DESKTOP_541_GCC) if pathSpec == Qt5Path.DOCS: @@ -196,10 +192,7 @@ class Qt5Path: @staticmethod def __preCheckAndExtractQtVersionStr__(target): if target not in Targets.ALL_TARGETS: - # Ignore DESKTOP_561_DEFAULT which only delivers examples but not a kit yet. - # Remove the condition as soon as it is being used as a kit in tests. - if not target == Targets.DESKTOP_561_DEFAULT: - raise Exception("Unexpected target '%s'" % str(target)) + raise Exception("Unexpected target '%s'" % str(target)) matcher = re.match("^Desktop (5\\d{2}).*$", Targets.getStringForTarget(target)) if matcher is None: diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index d5cf7030aa..3eba7a13d6 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -629,7 +629,9 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False): version = res.group("version") else: version = None - if 'Supported Platforms' in text: + if 'only available with Qt 5.6' in text: + result = [Targets.DESKTOP_561_DEFAULT] + elif 'Supported Platforms' in text: supports = text[text.find('Supported Platforms'):].split(":")[1].strip().split(" ") result = [] if 'Desktop' in supports: @@ -638,7 +640,7 @@ def __getSupportedPlatforms__(text, templateName, getAsStrings=False): result.append(Targets.DESKTOP_480_DEFAULT) if platform.system() in ("Linux", "Darwin"): result.append(Targets.EMBEDDED_LINUX) - result.extend([Targets.DESKTOP_521_DEFAULT, Targets.DESKTOP_531_DEFAULT]) + result.extend([Targets.DESKTOP_531_DEFAULT, Targets.DESKTOP_561_DEFAULT]) if platform.system() != 'Darwin': result.append(Targets.DESKTOP_541_GCC) if not templateName == "Qt Creator Plugin" and (version == None or version < "5.0"): diff --git a/tests/system/suite_debugger/tst_debug_empty_main/test.py b/tests/system/suite_debugger/tst_debug_empty_main/test.py index c06dcefc26..f371b5ec22 100644 --- a/tests/system/suite_debugger/tst_debug_empty_main/test.py +++ b/tests/system/suite_debugger/tst_debug_empty_main/test.py @@ -55,7 +55,7 @@ def main(): editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget") typeLines(editor, ["int main() {"]) invokeMenuItem("File", "Save All") - performDebugging(workingDir, projectName, checkedTargets) + performDebugging(projectName, checkedTargets) invokeMenuItem("File", "Close All Projects and Editors") # C/C++ targets = Targets.intToArray(Targets.desktopTargetClasses()) @@ -75,7 +75,7 @@ def main(): invokeMenuItem("File", "Save All") progressBarWait(15000) setRunInTerminal(1, 0, False) - performDebugging(workingDir, projectName, [singleTarget]) + performDebugging(projectName, [singleTarget]) invokeMenuItem("File", "Close All Projects and Editors") invokeMenuItem("File", "Exit") @@ -89,15 +89,21 @@ def __handleAppOutputWaitForDebuggerFinish__(): invokeMenuItem("Debug", "Abort Debugging") waitFor("str(appOutput.plainText).endswith('Debugging has finished')", 5000) -def performDebugging(workingDir, projectName, checkedTargets): +def performDebugging(projectName, checkedTargets): for kit, config in iterateBuildConfigs(len(checkedTargets), "Debug"): test.log("Selecting '%s' as build config" % config) - verifyBuildConfig(len(checkedTargets), kit, config, True) + verifyBuildConfig(len(checkedTargets), kit, config, True, True) progressBarWait(10000) invokeMenuItem("Build", "Rebuild All") waitForCompile() isMsvc = isMsvcConfig(len(checkedTargets), kit) - allowAppThroughWinFW(workingDir, projectName, False) + if platform.system() in ('Microsoft' 'Windows'): + switchViewTo(ViewConstants.PROJECTS) + switchToBuildOrRunSettingsFor(len(checkedTargets), kit, ProjectSettings.BUILD) + buildDir = os.path.join(str(waitForObject(":Qt Creator_Utils::BuildDirectoryLineEdit").text), + "debug") + switchViewTo(ViewConstants.EDIT) + allowAppThroughWinFW(buildDir, projectName, None) clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton")) handleDebuggerWarnings(config, isMsvc) waitForObject(":Qt Creator.DebugModeWidget_QSplitter") @@ -112,4 +118,5 @@ def performDebugging(workingDir, projectName, checkedTargets): clickButton(waitForObject(":*Qt Creator.Continue_Core::Internal::FancyToolButton")) __handleAppOutputWaitForDebuggerFinish__() removeOldBreakpoints() - deleteAppFromWinFW(workingDir, projectName, False) + if platform.system() in ('Microsoft' 'Windows'): + deleteAppFromWinFW(buildDir, projectName, None) diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py index 53535e3490..e1fcfecd39 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/test.py +++ b/tests/system/suite_debugger/tst_simple_analyze/test.py @@ -65,7 +65,7 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): # switching from MSVC to MinGW build will fail on the clean step of 'Rebuild All' because # of differences between MSVC's and MinGW's Makefile (so clean before switching kits) invokeMenuItem('Build', 'Clean Project "%s"' % projectName) - qtVersion = verifyBuildConfig(targetCount, kit, config, True, enableQmlDebug=True)[0] + qtVersion = verifyBuildConfig(targetCount, kit, config, True, True, True)[0] test.log("Selected kit using Qt %s" % qtVersion) # explicitly build before start debugging for adding the executable as allowed program to WinFW invokeMenuItem("Build", "Rebuild All") @@ -73,7 +73,13 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): if not checkCompile(): test.fatal("Compile had errors... Skipping current build config") continue - allowAppThroughWinFW(workingDir, projectName, False) + if platform.system() in ('Microsoft' 'Windows'): + switchViewTo(ViewConstants.PROJECTS) + switchToBuildOrRunSettingsFor(targetCount, kit, ProjectSettings.BUILD) + buildDir = os.path.join(str(waitForObject(":Qt Creator_Utils::BuildDirectoryLineEdit").text), + "debug") + switchViewTo(ViewConstants.EDIT) + allowAppThroughWinFW(buildDir, projectName, None) switchViewTo(ViewConstants.DEBUG) selectFromCombo(":Analyzer Toolbar.AnalyzerManagerToolBox_QComboBox", "QML Profiler") recordButton = waitForObject("{container=':DebugModeWidget.Toolbar_QDockWidget' " @@ -123,7 +129,8 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): elif str(model.index(row, colCalls).data()) == "2": test.compare(model.index(row, colMedian).data(), model.index(row, colLongest).data(), "For two calls, median and longest time must be the same.") - deleteAppFromWinFW(workingDir, projectName, False) + if platform.system() in ('Microsoft' 'Windows'): + deleteAppFromWinFW(buildDir, projectName, None) progressBarWait(15000, False) # wait for "Build" progressbar to disappear clickButton(waitForObject(":Analyzer Toolbar.Clear_QToolButton")) test.verify(waitFor("model.rowCount() == 0", 3000), "Analyzer results cleared.") diff --git a/tests/system/suite_debugger/tst_simple_debug/test.py b/tests/system/suite_debugger/tst_simple_debug/test.py index b6646b7f22..14c250acad 100644 --- a/tests/system/suite_debugger/tst_simple_debug/test.py +++ b/tests/system/suite_debugger/tst_simple_debug/test.py @@ -58,14 +58,20 @@ def main(): test.fatal("Haven't found a suitable Qt version - leaving without debugging.") for kit, config in availableConfigs: test.log("Selecting '%s' as build config" % config) - verifyBuildConfig(len(checkedTargets), kit, config, True, enableQmlDebug=True) + verifyBuildConfig(len(checkedTargets), kit, config, True, True, True) # explicitly build before start debugging for adding the executable as allowed program to WinFW invokeMenuItem("Build", "Rebuild All") waitForCompile(300000) if not checkCompile(): test.fatal("Compile had errors... Skipping current build config") continue - allowAppThroughWinFW(workingDir, projectName, False) + if platform.system() in ('Microsoft' 'Windows'): + switchViewTo(ViewConstants.PROJECTS) + switchToBuildOrRunSettingsFor(len(checkedTargets), kit, ProjectSettings.BUILD) + buildDir = os.path.join(str(waitForObject(":Qt Creator_Utils::BuildDirectoryLineEdit").text), + "debug") + switchViewTo(ViewConstants.EDIT) + allowAppThroughWinFW(buildDir, projectName, None) if not doSimpleDebugging(len(checkedTargets), kit, config, len(expectedBreakpointsOrder), expectedBreakpointsOrder): try: @@ -74,7 +80,8 @@ def main(): clickButton(stopB) except: pass - deleteAppFromWinFW(workingDir, projectName, False) + if platform.system() in ('Microsoft' 'Windows'): + deleteAppFromWinFW(buildDir, projectName, None) # close application output window of current run to avoid mixing older output on the next run ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton") clickButton(waitForObject("{type='CloseButton' unnamed='1' visible='1' " diff --git a/tests/system/suite_editors/tst_qml_editor/test.py b/tests/system/suite_editors/tst_qml_editor/test.py index 70f56ea14d..7f3fedb513 100644 --- a/tests/system/suite_editors/tst_qml_editor/test.py +++ b/tests/system/suite_editors/tst_qml_editor/test.py @@ -26,7 +26,7 @@ source("../../shared/qtcreator.py") def main(): - target = Targets.DESKTOP_521_DEFAULT + target = Targets.DESKTOP_531_DEFAULT sourceExample = os.path.join(Qt5Path.examplesPath(target), "declarative/keyinteraction/focus") proFile = "focus.pro" if not neededFilePresent(os.path.join(sourceExample, proFile)): diff --git a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py index f9ddd3bcc3..44846f4fdf 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py @@ -29,7 +29,7 @@ def main(): startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return - available = [("5.3", False), ("5.3", True)] + available = [("5.6", False), ("5.6", True)] if platform.system() != 'Darwin': available.extend([("5.4", False), ("5.4", True)]) @@ -39,9 +39,9 @@ def main(): projectName = createNewQtQuickUI(workingDir, qtVersion, controls) switchViewTo(ViewConstants.PROJECTS) clickButton(waitForObject(":*Qt Creator.Add Kit_QPushButton")) - if qtVersion == "5.3": - menuItem = Targets.getStringForTarget(Targets.DESKTOP_531_DEFAULT) - quick = "2.3" + if qtVersion == "5.6": + menuItem = Targets.getStringForTarget(Targets.DESKTOP_561_DEFAULT) + quick = "2.6" else: menuItem = Targets.getStringForTarget(Targets.DESKTOP_541_GCC) quick = "2.4" diff --git a/tests/system/suite_qtquick/tst_qtquick_creation4/test.py b/tests/system/suite_qtquick/tst_qtquick_creation4/test.py index 54c7e25772..99cccb8cd2 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation4/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation4/test.py @@ -29,7 +29,7 @@ def main(): startApplication("qtcreator" + SettingsPath) if not startedWithoutPluginError(): return - for targ, quickVer in [[Targets.DESKTOP_480_DEFAULT, 1], [Targets.DESKTOP_521_DEFAULT, 2], + for targ, quickVer in [[Targets.DESKTOP_480_DEFAULT, 1], [Targets.DESKTOP_561_DEFAULT, 2], [Targets.DESKTOP_531_DEFAULT, 2]]: # using a temporary directory won't mess up a potentially existing createNewQmlExtension(tempDir(), targ, quickVer) |