Merge remote-tracking branch 'origin/4.0'

Conflicts:
	src/plugins/coreplugin/find/findtoolbar.h

Change-Id: I7db695a28473d1b16c46b1e39a4d6fce537c13a1
This commit is contained in:
Eike Ziller
2016-03-16 15:28:47 +01:00
112 changed files with 1472 additions and 715 deletions

View File

@@ -265,6 +265,9 @@ we thank the authors who made this possible:
The source code of Botan C++ crypto library can be found in
QtCreator/src/libs/3rdparty
### SQLite, in-process library that implements a SQL database engine
SQLite (https://www.sqlite.org) is in the Public Domain.
### ClassView and ImageViewer plugins
@@ -304,6 +307,3 @@ we thank the authors who made this possible:
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."

214
dist/changes-4.0.0.md vendored Normal file
View File

@@ -0,0 +1,214 @@
Qt Creator version 4.0 contains bug fixes and new features.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/3.6..origin/4.0
General
* Changed licensing to GPLv3 with exception
* Made commercial-only features available as opensource:
* Test integration
* Clang static analyzer integration
* QML Profiler extensions
* Merged Debug and Analyze modes
* Added support for using `git grep` for file system search
(QTCREATORBUG-3556)
* Fixed issues with HiDPI (QTCREATORBUG-15222)
* Fixed that switching theme did not switch editor color scheme
(QTCREATORBUG-15229)
Editing
* Added support for `(<linenumber>)` after file names when opening files
(QTCREATORBUG-14724)
* Added `Go to Previous Split or Window`
* Fixed whitespace cleaning for mixed tabs and spaces configurations
(QTCREATORBUG-7994)
Help
* Fixed issues with scrolling to right position (QTCREATORBUG-15548)
QMake Projects
* Added wizard for creating `Qt Labs Controls Application`
* Added support for `STATECHARTS`
CMake Projects
* Changed CMake to run automatically in the background
* Added CMake generator setting per kit
* Added CMake configuration setting per kit and build configuration
* Added reading of existing `CMakeCache.txt`
* Added parsing of CMake errors
* Changed building to use `cmake --build`
* Fixed that `clean` target could be missing
* Fixed issue with mapping source files to targets (QTCREATORBUG-15825)
Qbs Projects
* Improved performance when opening large projects
* Added support for SCXML files
Qt Support
* Added C++ and QML code model support for `SCXML` files via `qscxmlc`
* Fixed that moc notes were reported as errors
C++ Support
* Fixed issue with negative enum values
* Clang code model
* Simplified activation (it is now active if the plugin is enabled)
* Added customizable configurations for warnings (global and per project)
* Added light bulb for Clang's Fix-its
* Fixed that child diagnostics were not shown in tool tip
QML Support
* Fixed various issues with QML/JS Console (QTCREATORBUG-14931)
Debugging
* Added pretty printers for `std::set`, `std::map` and `std::multimap`
(for simple types of keys and values)
* Improved performance for watches
* Improved visualization of `QByteArray` and `char[]` with non-printable
values (QTCREATORBUG-15549)
* CDB
* Fixed showing value of `std::[w]string` (QTCREATORBUG-15016)
QML Profiler
* Added visualizing statistics as flame graphs
* Added support for additional input event attributes
* Added zooming timeline with `Ctrl + mouse wheel`
* Added `self time` to events
* Renamed `Events View` to `Statistics View`
* Fixed that zooming time line moved it to different location
(QTCREATORBUG-15440)
Clang Static Analyzer
* Fixed analyzing with MinGW tool chain settings
Test Integration
* Added searching through test results
* Fixed resolution of source file of failed test on Windows (QTCREATORBUG-15667)
* Fixed that additional output of passing tests was ignored
* Fixed test detection with CMake projects (QTCREATORBUG-15813)
* Google Test
* Added support for typed tests
* Fixed parsing of file and line information
Qt Quick Designer
* Added `Space + mouse drag` for dragging design area (QTCREATORBUG-11321)
* Added dialog for adding signal handlers
* Fixed `Always save when leaving subcomponent in bread crumb`
Version Control Systems
* Git
* Increased minimum Git version to 1.8.0
* Fixed missing update of file list in commit editor after merging files
(QTCREATORBUG-15569)
* Added optional hiding of branches without activity for 90 days to Branches
dialog (QTCREATORBUG-15544)
Diff Viewer
* Added scrolling to file when showing a change from file log
Custom Wizards
* Added that directories are allowed as file generator source
FakeVim
* Fixed replacing with special characters (QTCREATORBUG-15512)
* Fixed issue with `Ctrl+[` (QTCREATORBUG-15261)
TODO
* Added searching through TODO entries
Model Editor
* Added exporting diagrams as PNG, PDF, or SVG
(Tools > Model Editor > Export Diagram)
* Added support for model specific configuration
* Added automatic showing of class members
* Added in-place editing of item names
* Fixed issue with special characters in class member declarations
* Fixed support for static members
Platform Specific
Windows
* Added auto-detection of Clang tool chain (QTCREATORBUG-15641)
Linux
* Changed default terminal to `x-terminal-emulator`
* Fixed notification for externally modified files while modal dialog is open
(QTCREATORBUG-15687)
Android
* Fixed issues with `Select Android Device`
(QTCREATORBUG-15338, QTCREATORBUG-15422)
Credits for these changes go to:
Alessandro Portale
Alexandru Croitor
Andre Hartmann
André Pönitz
Artem Chystikov
Aurindam Jana
BogDan Vatra
Caspar Schutijser
Christiaan Janssen
Christian Kandeler
Christian Stenger
Daniel Teske
David Schulz
Denis Shienkov
Dmytro Poplavskiy
Eike Ziller
Fathi Boudra
Francois Ferrand
Friedemann Kleint
Jake Petroules
Jesus Fernandez
Jochen Becher
Kai Köhne
Leena Miettinen
Lorenz Haas
Lukas Holecek
Marco Benelli
Marco Bubke
Marc Reilly
Martin Kampas
Mitch Curtis
Niels Weber
Nikita Baryshnikov
Nikolai Kosjar
Orgad Shaneh
Oswald Buddenhagen
Robert Löhning
Svenn-Arne Dragly
Takumi ASAKI
Thomas Hartmann
Tim Jenssen
Tobias Hunger
Tom Deblauwe
Topi Reinio
Ulf Hermann
Yuchen Deng

View File

@@ -2,7 +2,7 @@
<Installer>
<Name>Qt Creator</Name>
<Version>{version}</Version>
<Title>Qt Creator {version}</Title>
<Title>Qt Creator {display_version}</Title>
<Publisher>Qt Project</Publisher>
<ProductUrl>http://www.qt.io</ProductUrl>
@@ -11,6 +11,6 @@
<WizardDefaultHeight>520</WizardDefaultHeight>
<MaintenanceToolName>QtCreatorUninstaller</MaintenanceToolName>
<!-- @homeDir@ and @rootDir@ are some of the supported vars -->
<TargetDir>@homeDir@/qtcreator-{version}</TargetDir>
<AdminTargetDir>/opt/qtcreator-{version}</AdminTargetDir>
<TargetDir>@homeDir@/qtcreator-{display_version}</TargetDir>
<AdminTargetDir>/opt/qtcreator-{display_version}</AdminTargetDir>
</Installer>

View File

@@ -2,7 +2,7 @@
<Installer>
<Name>Qt Creator</Name>
<Version>{version}</Version>
<Title>Qt Creator {version}</Title>
<Title>Qt Creator {display_version}</Title>
<Publisher>Qt Project</Publisher>
<ProductUrl>http://www.qt.io</ProductUrl>
@@ -11,6 +11,6 @@
<WizardDefaultHeight>560</WizardDefaultHeight>
<MaintenanceToolName>Uninstall Qt Creator</MaintenanceToolName>
<!-- @homeDir@ and @rootDir@ are some of the supported vars -->
<TargetDir>@homeDir@/Applications/Qt Creator {version}</TargetDir>
<TargetDir>@homeDir@/Applications/Qt Creator {display_version}</TargetDir>
<AllowSpaceInPath>true</AllowSpaceInPath>
</Installer>

View File

@@ -2,7 +2,7 @@
<Installer>
<Name>Qt Creator</Name>
<Version>{version}</Version>
<Title>Qt Creator {version}</Title>
<Title>Qt Creator {display_version}</Title>
<Publisher>Qt Project</Publisher>
<ProductUrl>http://www.qt.io</ProductUrl>
@@ -11,6 +11,6 @@
<WizardDefaultHeight>560</WizardDefaultHeight>
<MaintenanceToolName>QtCreatorUninst</MaintenanceToolName>
<!-- @homeDir@ and @rootDir@ are some of the supported vars -->
<TargetDir>@rootDir@/Qt/qtcreator-{version}</TargetDir>
<TargetDir>@rootDir@/Qt/qtcreator-{display_version}</TargetDir>
<StartMenuDir>Qt Creator</StartMenuDir>
</Installer>

View File

@@ -15,7 +15,8 @@
#include <QtPlugin>
using namespace Example::Internal;
namespace Example {
namespace Internal {
ExamplePlugin::ExamplePlugin()
{
@@ -45,7 +46,7 @@ bool ExamplePlugin::initialize(const QStringList &arguments, QString *errorStrin
Core::Command *cmd = Core::ActionManager::registerAction(action, Constants::ACTION_ID,
Core::Context(Core::Constants::C_GLOBAL));
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Meta+A")));
connect(action, SIGNAL(triggered()), this, SLOT(triggerAction()));
connect(action, &QAction::triggered, this, &ExamplePlugin::triggerAction);
//! [add action]
//! [add menu]
Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::MENU_ID);
@@ -80,3 +81,6 @@ void ExamplePlugin::triggerAction()
tr("This is an action from Example."));
}
//! [slot implementation]
} // namespace Internal
} // namespace Example

View File

@@ -28,7 +28,7 @@ public:
//! [plugin functions]
//! [slot]
private slots:
private:
void triggerAction();
//! [slot]
};

View File

@@ -36,7 +36,7 @@ import shutil
import inspect
def usage():
print('Usage: %s [-v|--version-string=versionstring] [-i|--installer-path=/path/to/installerfw] [-a|--archive=archive.7z] [-d|--debug] <outputname>' % os.path.basename(sys.argv[0]))
print('Usage: %s [-v|--version-string=versionstring] [-d|--display-version=versionstring] [-i|--installer-path=/path/to/installerfw] [-a|--archive=archive.7z] [--debug] <outputname>' % os.path.basename(sys.argv[0]))
def substitute_file(infile, outfile, substitutions):
with open(infile, 'r') as f:
@@ -46,12 +46,12 @@ def substitute_file(infile, outfile, substitutions):
def ifw_template_dir():
script_dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
source_dir = os.path.normpath(os.path.join(script_dir, '..'));
source_dir = os.path.normpath(os.path.join(script_dir, '..'))
return os.path.normpath(os.path.join(source_dir, 'dist', 'installer', 'ifw'))
def main():
try:
opts, args = getopt.gnu_getopt(sys.argv[1:], 'hv:i:a:d', ['help', 'version-string=', 'installer-path=', 'archive', 'debug'])
opts, args = getopt.gnu_getopt(sys.argv[1:], 'hv:d:i:a:', ['help', 'version-string=', 'display-version=', 'installer-path=', 'archive', 'debug'])
except:
usage()
sys.exit(2)
@@ -61,25 +61,31 @@ def main():
sys.exit(2)
version = ''
display_version = ''
ifw_location = ''
archives = []
debug = False
for o, a in opts:
if o in ('-h', '--help'):
if o in ['-h', '--help']:
usage()
sys.exit(0)
if o in ('-v', '--version-string'):
if o in ['-v', '--version-string']:
version = a
if o in ('-i', '--installer-path'):
if o in ['-d', '--display-version']:
display_version = a
if o in ['-i', '--installer-path']:
ifw_location = a
if o in ('-a', '--archive'):
if o in ['-a', '--archive']:
archives.append(a)
if o in ('-d', '--debug'):
if o in ['--debug']:
debug = True
if (version == ''):
raise Exception('Version not specified (--version-string)!')
if not display_version:
display_version = version
if (ifw_location == ''):
raise Exception('Installer framework location not specified (--installer-path)!')
@@ -108,6 +114,7 @@ def main():
try:
substs = {}
substs['version'] = version
substs['display_version'] = display_version
substs['date'] = datetime.date.today().isoformat()
substs['archives'] = ','.join(archives)

View File

@@ -8,7 +8,7 @@
<!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
<!ENTITY pathpart "([\w_@.&#37;*?+-]|\\ )"> <!-- valid character in a file name -->
]>
<language name="Bash" version="2.17" kateversion="2.4" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<language name="Bash" version="2.18" kateversion="5.0" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl)
Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)
@@ -929,17 +929,17 @@
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Keyword" defStyleNum="dsKeyword" />
<itemData name="Control" defStyleNum="dsKeyword" />
<itemData name="Builtin" defStyleNum="dsKeyword" color="#808" />
<itemData name="Command" defStyleNum="dsKeyword" color="#c0c" />
<itemData name="OtherCommand" defStyleNum="dsKeyword" color="#303" />
<itemData name="Redirection" defStyleNum="dsKeyword" color="#238" />
<itemData name="Builtin" defStyleNum="dsBuiltIn" />
<itemData name="Command" defStyleNum="dsFunction" />
<itemData name="OtherCommand" defStyleNum="dsExtension" />
<itemData name="Redirection" defStyleNum="dsOperator" />
<itemData name="Escape" defStyleNum="dsDataType" />
<itemData name="String SingleQ" defStyleNum="dsString" />
<itemData name="String DoubleQ" defStyleNum="dsString" />
<itemData name="Backquote" defStyleNum="dsKeyword" />
<itemData name="String Transl." defStyleNum="dsString" />
<itemData name="String Escape" defStyleNum="dsDataType" />
<itemData name="Variable" defStyleNum="dsOthers" />
<itemData name="Variable" defStyleNum="dsVariable" />
<itemData name="Expression" defStyleNum="dsOthers" />
<itemData name="Function" defStyleNum="dsFunction" />
<itemData name="Path" defStyleNum="dsNormal" />

View File

@@ -6,7 +6,7 @@
Copyright 2004 Alexander Neundorf (neundorf@kde.org)
Copyright 2005 Dominik Haumann (dhdev@gmx.de)
Copyright 2007,2008,2013,2014 Matthew Woehlke (mw_triad@users.sourceforge.net)
Copyright 2013,2014 Alex Turbov (i.zaufi@gmail.com)
Copyright 2013,2014,2015 Alex Turbov (i.zaufi@gmail.com)
**********************************************************************
* This library is free software; you can redistribute it and/or *
@@ -25,11 +25,11 @@
* Boston, MA 02110-1301, USA. *
**********************************************************************
-->
<!-- generated for "cmake version 2.8.12.1" -->
<!-- generated for "cmake version 2.8.12.1, 3.0.2, 3.1.2 and 3.3.0" -->
<language
name="CMake"
version="1.30"
kateversion="3.4"
version="1.35"
kateversion="5.0"
section="Other"
extensions="CMakeLists.txt;*.cmake;*.cmake.in"
style="CMake"
@@ -59,7 +59,21 @@
<item> cmake_minimum_required </item>
<item> cmake_policy </item>
<item> configure_file </item>
<item> continue </item>
<item> create_test_sourcelist </item>
<item> ctest_build </item>
<item> ctest_configure </item>
<item> ctest_coverage </item>
<item> ctest_empty_binary_directory </item>
<item> ctest_memcheck </item>
<item> ctest_read_custom_files </item>
<item> ctest_run_script </item>
<item> ctest_sleep </item>
<item> ctest_start </item>
<item> ctest_submit </item>
<item> ctest_test </item>
<item> ctest_update </item>
<item> ctest_upload </item>
<item> define_property </item>
<item> else </item>
<item> elseif </item>
@@ -130,9 +144,11 @@
<item> subdir_depends </item>
<item> subdirs </item>
<item> target_compile_definitions </item>
<item> target_compile_features </item>
<item> target_compile_options </item>
<item> target_include_directories </item>
<item> target_link_libraries </item>
<item> target_sources </item>
<item> try_compile </item>
<item> try_run </item>
<item> unset </item>
@@ -161,6 +177,7 @@
<item> ALPHABET </item>
<item> AND </item>
<item> APPEND </item>
<item> APPENDNUMBER_ERRORS </item>
<item> APPEND_STRING </item>
<item> ARCHIVE </item>
<item> ARGS </item>
@@ -168,9 +185,13 @@
<item> AUTHOR_WARNING </item>
<item> BEFORE </item>
<item> BRIEF_DOCS </item>
<item> BUILD </item>
<item> BUNDLE </item>
<item> BYPRODUCTS </item>
<item> CACHE </item>
<item> CACHED_VARIABLE </item>
<item> CDASH_UPLOAD </item>
<item> CDASH_UPLOAD_TYPE </item>
<item> CLEAR </item>
<item> CMAKE_FIND_ROOT_PATH_BOTH </item>
<item> CMAKE_FLAGS </item>
@@ -184,6 +205,7 @@
<item> COMPILE_RESULT_VAR </item>
<item> COMPONENT </item>
<item> COMPONENTS </item>
<item> CONCAT </item>
<item> CONDITION </item>
<item> CONFIG </item>
<item> CONFIGS </item>
@@ -206,6 +228,7 @@
<item> DOS </item>
<item> DOWNLOAD </item>
<item> ENV </item>
<item> END </item>
<item> EQUAL </item>
<item> ERROR_FILE </item>
<item> ERROR_QUIET </item>
@@ -215,6 +238,7 @@
<item> EXACT </item>
<item> EXCLUDE </item>
<item> EXCLUDE_FROM_ALL </item>
<item> EXCLUDE_LABEL </item>
<item> EXISTS </item>
<item> EXPECTED_HASH </item>
<item> EXPECTED_MD5 </item>
@@ -228,12 +252,14 @@
<item> FILES_MATCHING </item>
<item> FILE_PERMISSIONS </item>
<item> FIND </item>
<item> FLAGS </item>
<item> FOLLOW_SYMLINKS </item>
<item> FORCE </item>
<item> FRAMEWORK </item>
<item> FULL_DOCS </item>
<item> FUNCTION </item>
<item> GENERATE </item>
<item> GENEX_STRIP </item>
<item> GET </item>
<item> GLOB </item>
<item> GLOBAL </item>
@@ -241,6 +267,7 @@
<item> GREATER </item>
<item> GROUP_EXECUTE </item>
<item> GROUP_READ </item>
<item> GUARD </item>
<item> GUID </item>
<item> HEX </item>
<item> HINTS </item>
@@ -248,8 +275,10 @@
<item> IMPORTED </item>
<item> IN </item>
<item> INACTIVITY_TIMEOUT </item>
<item> INCLUDE </item>
<item> INCLUDES </item>
<item> INCLUDE_INTERNALS </item>
<item> INCLUDE_LABEL </item>
<item> INHERITED </item>
<item> INPUT </item>
<item> INPUT_FILE </item>
@@ -261,6 +290,8 @@
<item> IS_NEWER_THAN </item>
<item> IS_SYMLINK </item>
<item> ITEMS </item>
<item> LABELS </item>
<item> LANGUAGES </item>
<item> LENGTH </item>
<item> LENGTH_MAXIMUM </item>
<item> LENGTH_MINIMUM </item>
@@ -276,6 +307,8 @@
<item> LINK_PRIVATE </item>
<item> LINK_PUBLIC </item>
<item> LISTS </item>
<item> LIST_DIRECTORIES </item>
<item> LOCK </item>
<item> LOG </item>
<item> MACOSX_BUNDLE </item>
<item> MAIN_DEPENDENCY </item>
@@ -285,6 +318,7 @@
<item> MATCHALL </item>
<item> MATCHES </item>
<item> MD5 </item>
<item> MESSAGE_NEVER </item>
<item> MODULE </item>
<item> NAME </item>
<item> NAMELINK_ONLY </item>
@@ -295,6 +329,7 @@
<item> NEW </item>
<item> NEWLINE_CONSUME </item>
<item> NEWLINE_STYLE </item>
<item> NEW_PROCESS </item>
<item> NOT </item>
<item> NOTEQUAL </item>
<item> NO_CMAKE_BUILDS_PATH </item>
@@ -310,12 +345,17 @@
<item> NO_POLICY_SCOPE </item>
<item> NO_SOURCE_PERMISSIONS </item>
<item> NO_SYSTEM_ENVIRONMENT_PATH </item>
<item> NUMBER_ERRORS </item>
<item> NUMBER_WARNINGS </item>
<item> OBJECT </item>
<item> OFF </item>
<item> OFFSET </item>
<item> OLD </item>
<item> ON </item>
<item> ONLY_CMAKE_FIND_ROOT_PATH </item>
<item> OPTIONAL </item>
<item> OPTIONAL_COMPONENTS </item>
<item> OPTIONS </item>
<item> OR </item>
<item> OUTPUT </item>
<item> OUTPUT_DIRECTORY </item>
@@ -327,7 +367,9 @@
<item> OWNER_READ </item>
<item> OWNER_WRITE </item>
<item> PACKAGE </item>
<item> PARALLEL_LEVEL </item>
<item> PARENT_SCOPE </item>
<item> PARTS </item>
<item> PATHS </item>
<item> PATH_SUFFIXES </item>
<item> PATH_TO_MESA </item>
@@ -342,6 +384,7 @@
<item> PRE_LINK </item>
<item> PRIVATE </item>
<item> PRIVATE_HEADER </item>
<item> PROCESS </item>
<item> PROGRAM </item>
<item> PROGRAMS </item>
<item> PROGRAM_ARGS </item>
@@ -362,6 +405,7 @@
<item> REGULAR_EXPRESSION </item>
<item> RELATIVE </item>
<item> RELATIVE_PATH </item>
<item> RELEASE </item>
<item> REMOVE </item>
<item> REMOVE_AT </item>
<item> REMOVE_DUPLICATES </item>
@@ -376,12 +420,15 @@
<item> RESULT </item>
<item> RESULT_VAR </item>
<item> RESULT_VARIABLE </item>
<item> RETRY_COUNT </item>
<item> RETRY_DELAY </item>
<item> RETURN_VALUE </item>
<item> REVERSE </item>
<item> RUNTIME </item>
<item> RUNTIME_DIRECTORY </item>
<item> RUN_OUTPUT_VARIABLE </item>
<item> RUN_RESULT_VAR </item>
<item> SCHEDULE_RANDOM </item>
<item> SCRIPT </item>
<item> SEND_ERROR </item>
<item> SET </item>
@@ -395,10 +442,13 @@
<item> SORT </item>
<item> SOURCE </item>
<item> SOURCES </item>
<item> START </item>
<item> STATIC </item>
<item> STATUS </item>
<item> STREQUAL </item>
<item> STRGREATER </item>
<item> STOP_TIME </item>
<item> STRIDE </item>
<item> STRINGS </item>
<item> STRIP </item>
<item> STRLESS </item>
@@ -416,13 +466,17 @@
<item> TOUPPER </item>
<item> TO_CMAKE_PATH </item>
<item> TO_NATIVE_PATH </item>
<item> TRACK </item>
<item> TYPE </item>
<item> UNIX </item>
<item> UNIX_COMMAND </item>
<item> UNKNOWN </item>
<item> UPLOAD </item>
<item> UPPER </item>
<item> USES_TERMINAL </item>
<item> USE_SOURCE_PERMISSIONS </item>
<item> UTC </item>
<item> UUID </item>
<item> VALUE </item>
<item> VARIABLE </item>
<item> VERBATIM </item>
@@ -461,6 +515,8 @@
<item> AVAILABLE_VIRTUAL_MEMORY </item>
<item> TOTAL_PHYSICAL_MEMORY </item>
<item> AVAILABLE_PHYSICAL_MEMORY </item>
<!-- Since CMake 3.3 -->
<item> IN_LIST </item>
</list>
<!-- ATTENTION Do not change the list name! Or change a generation script accordingly -->
@@ -471,30 +527,61 @@
<item> ADVANCED </item>
<item> ALIASED_TARGET </item>
<item> ALLOW_DUPLICATE_CUSTOM_TARGETS </item>
<item> ANDROID_API </item>
<item> ANDROID_API_MIN </item>
<item> ANDROID_GUI </item>
<item> ARCHIVE_OUTPUT_DIRECTORY </item>
<item> ARCHIVE_OUTPUT_NAME </item>
<item> ATTACHED_FILES </item>
<item> ATTACHED_FILES_ON_FAIL </item>
<item> AUTOGEN_TARGETS_FOLDER </item>
<item> AUTOGEN_TARGET_DEPENDS </item>
<item> AUTOMOC </item>
<item> AUTOMOC_MOC_OPTIONS </item>
<item> AUTOMOC_TARGETS_FOLDER </item>
<item> AUTORCC </item>
<item> AUTORCC_OPTIONS </item>
<item> AUTOUIC </item>
<item> AUTOUIC_OPTIONS </item>
<item> BUILD_WITH_INSTALL_RPATH </item>
<item> BUNDLE </item>
<item> BUNDLE_EXTENSION </item>
<item> CACHE_VARIABLES </item>
<item> CLEAN_NO_CUSTOM </item>
<item> CMAKE_CONFIGURE_DEPENDS </item>
<item> CMAKE_CXX_KNOWN_FEATURES </item>
<item> CMAKE_C_KNOWN_FEATURES </item>
<item> COMPATIBLE_INTERFACE_BOOL </item>
<item> COMPATIBLE_INTERFACE_NUMBER_MAX </item>
<item> COMPATIBLE_INTERFACE_NUMBER_MIN </item>
<item> COMPATIBLE_INTERFACE_STRING </item>
<item> COMPILE_DEFINITIONS </item>
<item> COMPILE_FEATURES </item>
<item> COMPILE_FLAGS </item>
<item> COMPILE_OPTIONS </item>
<item> COMPILE_PDB_NAME </item>
<item> COMPILE_PDB_OUTPUT_DIRECTORY </item>
<item> COST </item>
<item> CPACK_DESKTOP_SHORTCUTS </item>
<item> CPACK_NEVER_OVERWRITE </item>
<item> CPACK_PERMANENT </item>
<item> CPACK_STARTUP_SHORTCUTS </item>
<item> CPACK_START_MENU_SHORTCUTS </item>
<item> CPACK_WIX_ACL </item>
<item> CROSSCOMPILING_EMULATOR </item>
<item> CXX_EXTENSIONS </item>
<item> CXX_STANDARD </item>
<item> CXX_STANDARD_REQUIRED </item>
<item> C_EXTENSIONS </item>
<item> C_STANDARD </item>
<item> C_STANDARD_REQUIRED </item>
<item> DEBUG_CONFIGURATIONS </item>
<item> DEBUG_POSTFIX </item>
<item> DEFINE_SYMBOL </item>
<item> DEFINITIONS </item>
<item> DEPENDS </item>
<item> DISABLED_FEATURES </item>
<item> ECLIPSE_EXTRA_NATURES </item>
<item> ENABLED_FEATURES </item>
<item> ENABLED_LANGUAGES </item>
<item> ENABLE_EXPORTS </item>
@@ -537,14 +624,20 @@
<item> INSTALL_NAME_DIR </item>
<item> INSTALL_RPATH </item>
<item> INSTALL_RPATH_USE_LINK_PATH </item>
<item> INTERFACE_AUTOUIC_OPTIONS </item>
<item> INTERFACE_COMPILE_DEFINITIONS </item>
<item> INTERFACE_COMPILE_FEATURES </item>
<item> INTERFACE_COMPILE_OPTIONS </item>
<item> INTERFACE_INCLUDE_DIRECTORIES </item>
<item> INTERFACE_LINK_LIBRARIES </item>
<item> INTERFACE_POSITION_INDEPENDENT_CODE </item>
<item> INTERFACE_SOURCES </item>
<item> INTERFACE_SYSTEM_INCLUDE_DIRECTORIES </item>
<item> INTERPROCEDURAL_OPTIMIZATION </item>
<item> IN_TRY_COMPILE </item>
<item> JOB_POOLS </item>
<item> JOB_POOL_COMPILE </item>
<item> JOB_POOL_LINK </item>
<item> KEEP_EXTENSION </item>
<item> LABELS </item>
<item> LANGUAGE </item>
@@ -572,6 +665,7 @@
<item> MODIFIED </item>
<item> NAME </item>
<item> NO_SONAME </item>
<item> NO_SYSTEM_FROM_IMPORTED </item>
<item> OBJECT_DEPENDS </item>
<item> OBJECT_OUTPUTS </item>
<item> OSX_ARCHITECTURES </item>
@@ -603,6 +697,7 @@
<item> RUNTIME_OUTPUT_NAME </item>
<item> RUN_SERIAL </item>
<item> SKIP_BUILD_RPATH </item>
<item> SKIP_RETURN_CODE </item>
<item> SOURCES </item>
<item> SOVERSION </item>
<item> STATIC_LIBRARY_FLAGS </item>
@@ -619,6 +714,8 @@
<item> VARIABLES </item>
<item> VERSION </item>
<item> VISIBILITY_INLINES_HIDDEN </item>
<item> VS_DEPLOYMENT_CONTENT </item>
<item> VS_DEPLOYMENT_LOCATION </item>
<item> VS_DOTNET_REFERENCES </item>
<item> VS_DOTNET_TARGET_FRAMEWORK_VERSION </item>
<item> VS_GLOBAL_KEYWORD </item>
@@ -629,13 +726,21 @@
<item> VS_SCC_LOCALPATH </item>
<item> VS_SCC_PROJECTNAME </item>
<item> VS_SCC_PROVIDER </item>
<item> VS_SHADER_ENTRYPOINT </item>
<item> VS_SHADER_FLAGS </item>
<item> VS_SHADER_MODEL </item>
<item> VS_SHADER_TYPE </item>
<item> VS_WINRT_COMPONENT </item>
<item> VS_WINRT_EXTENSIONS </item>
<item> VS_WINRT_REFERENCES </item>
<item> VS_XAML_TYPE </item>
<item> WILL_FAIL </item>
<item> WIN32_EXECUTABLE </item>
<item> WORKING_DIRECTORY </item>
<item> WRAP_EXCLUDE </item>
<item> __CMAKE_DELETE_CACHE_CHANGE_VARS_ </item>
<item> XCODE_EXPLICIT_FILE_TYPE </item>
<item> XCODE_LAST_KNOWN_FILE_TYPE </item>
<item> XCTEST </item>
</list>
<!-- these are "special" and don't show up in the generated lists -->
@@ -651,6 +756,10 @@
<item> BORLAND </item>
<item> BUILD_SHARED_LIBS </item>
<item> CMAKE_ABSOLUTE_DESTINATION_FILES </item>
<item> CMAKE_ANDROID_API </item>
<item> CMAKE_ANDROID_API_MIN </item>
<item> CMAKE_ANDROID_GUI </item>
<item> CMAKE_APPBUNDLE_PATH </item>
<item> CMAKE_AR </item>
<item> CMAKE_ARCHIVE_OUTPUT_DIRECTORY </item>
<item> CMAKE_ARGC </item>
@@ -658,6 +767,10 @@
<item> CMAKE_AUTOMOC </item>
<item> CMAKE_AUTOMOC_MOC_OPTIONS </item>
<item> CMAKE_AUTOMOC_RELAXED_MODE </item>
<item> CMAKE_AUTORCC </item>
<item> CMAKE_AUTORCC_OPTIONS </item>
<item> CMAKE_AUTOUIC </item>
<item> CMAKE_AUTOUIC_OPTIONS </item>
<item> CMAKE_BACKWARDS_COMPATIBILITY </item>
<item> CMAKE_BINARY_DIR </item>
<item> CMAKE_BUILD_TOOL </item>
@@ -672,14 +785,24 @@
<item> CMAKE_COLOR_MAKEFILE </item>
<item> CMAKE_COMMAND </item>
<item> CMAKE_COMPILER_2005 </item>
<item> CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY </item>
<item> CMAKE_CONFIGURATION_TYPES </item>
<item> CMAKE_CROSSCOMPILING </item>
<item> CMAKE_CROSSCOMPILING_EMULATOR </item>
<item> CMAKE_CTEST_COMMAND </item>
<item> CMAKE_CURRENT_BINARY_DIR </item>
<item> CMAKE_CURRENT_LIST_DIR </item>
<item> CMAKE_CURRENT_LIST_FILE </item>
<item> CMAKE_CURRENT_LIST_LINE </item>
<item> CMAKE_CURRENT_SOURCE_DIR </item>
<item> CMAKE_CXX_COMPILE_FEATURES </item>
<item> CMAKE_CXX_EXTENSIONS </item>
<item> CMAKE_CXX_STANDARD </item>
<item> CMAKE_CXX_STANDARD_REQUIRED </item>
<item> CMAKE_C_COMPILE_FEATURES </item>
<item> CMAKE_C_EXTENSIONS </item>
<item> CMAKE_C_STANDARD </item>
<item> CMAKE_C_STANDARD_REQUIRED </item>
<item> CMAKE_DEBUG_POSTFIX </item>
<item> CMAKE_DEBUG_TARGET_PROPERTIES </item>
<item> CMAKE_DL_LIBS </item>
@@ -688,17 +811,29 @@
<item> CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION </item>
<item> CMAKE_EXECUTABLE_SUFFIX </item>
<item> CMAKE_EXE_LINKER_FLAGS </item>
<item> CMAKE_EXPORT_NO_PACKAGE_REGISTRY </item>
<item> CMAKE_EXTRA_GENERATOR </item>
<item> CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES </item>
<item> CMAKE_FIND_LIBRARY_PREFIXES </item>
<item> CMAKE_FIND_LIBRARY_SUFFIXES </item>
<item> CMAKE_FIND_NO_INSTALL_PREFIX </item>
<item> CMAKE_FIND_PACKAGE_NAME </item>
<item> CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY </item>
<item> CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY </item>
<item> CMAKE_FIND_PACKAGE_WARN_NO_MODULE </item>
<item> CMAKE_FIND_ROOT_PATH </item>
<item> CMAKE_FIND_ROOT_PATH_MODE_INCLUDE </item>
<item> CMAKE_FIND_ROOT_PATH_MODE_LIBRARY </item>
<item> CMAKE_FIND_ROOT_PATH_MODE_PACKAGE </item>
<item> CMAKE_FIND_ROOT_PATH_MODE_PROGRAM </item>
<item> CMAKE_FRAMEWORK_PATH </item>
<item> CMAKE_Fortran_FORMAT </item>
<item> CMAKE_Fortran_MODDIR_DEFAULT </item>
<item> CMAKE_Fortran_MODDIR_FLAG </item>
<item> CMAKE_Fortran_MODOUT_FLAG </item>
<item> CMAKE_Fortran_MODULE_DIRECTORY </item>
<item> CMAKE_GENERATOR </item>
<item> CMAKE_GENERATOR_PLATFORM </item>
<item> CMAKE_GENERATOR_TOOLSET </item>
<item> CMAKE_GNUtoMS </item>
<item> CMAKE_HOME_DIRECTORY </item>
@@ -714,13 +849,18 @@
<item> CMAKE_IMPORT_LIBRARY_SUFFIX </item>
<item> CMAKE_INCLUDE_CURRENT_DIR </item>
<item> CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE </item>
<item> CMAKE_INCLUDE_DIRECTORIES_BEFORE </item>
<item> CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE </item>
<item> CMAKE_INCLUDE_PATH </item>
<item> CMAKE_INSTALL_DEFAULT_COMPONENT_NAME </item>
<item> CMAKE_INSTALL_MESSAGE </item>
<item> CMAKE_INSTALL_NAME_DIR </item>
<item> CMAKE_INSTALL_PREFIX </item>
<item> CMAKE_INSTALL_RPATH </item>
<item> CMAKE_INSTALL_RPATH_USE_LINK_PATH </item>
<item> CMAKE_INTERNAL_PLATFORM_ABI </item>
<item> CMAKE_JOB_POOL_COMPILE </item>
<item> CMAKE_JOB_POOL_LINK </item>
<item> CMAKE_LIBRARY_ARCHITECTURE </item>
<item> CMAKE_LIBRARY_ARCHITECTURE_REGEX </item>
<item> CMAKE_LIBRARY_OUTPUT_DIRECTORY </item>
@@ -733,8 +873,10 @@
<item> CMAKE_LINK_LIBRARY_FLAG </item>
<item> CMAKE_LINK_LIBRARY_SUFFIX </item>
<item> CMAKE_MACOSX_BUNDLE </item>
<item> CMAKE_MACOSX_RPATH </item>
<item> CMAKE_MAJOR_VERSION </item>
<item> CMAKE_MAKE_PROGRAM </item>
<item> CMAKE_MATCH_COUNT </item>
<item> CMAKE_MFC_FLAG </item>
<item> CMAKE_MINIMUM_REQUIRED_VERSION </item>
<item> CMAKE_MINOR_VERSION </item>
@@ -742,7 +884,11 @@
<item> CMAKE_MODULE_PATH </item>
<item> CMAKE_NOT_USING_CONFIG_FLAGS </item>
<item> CMAKE_NO_BUILTIN_CHRPATH </item>
<item> CMAKE_NO_SYSTEM_FROM_IMPORTED </item>
<item> CMAKE_OBJECT_PATH_MAX </item>
<item> CMAKE_OSX_ARCHITECTURES </item>
<item> CMAKE_OSX_DEPLOYMENT_TARGET </item>
<item> CMAKE_OSX_SYSROOT </item>
<item> CMAKE_PARENT_LIST_FILE </item>
<item> CMAKE_PATCH_VERSION </item>
<item> CMAKE_PDB_OUTPUT_DIRECTORY </item>
@@ -763,12 +909,15 @@
<item> CMAKE_SKIP_BUILD_RPATH </item>
<item> CMAKE_SKIP_INSTALL_ALL_DEPENDENCY </item>
<item> CMAKE_SKIP_INSTALL_RPATH </item>
<item> CMAKE_SKIP_INSTALL_RULES </item>
<item> CMAKE_SKIP_RPATH </item>
<item> CMAKE_SOURCE_DIR </item>
<item> CMAKE_STAGING_PREFIX </item>
<item> CMAKE_STANDARD_LIBRARIES </item>
<item> CMAKE_STATIC_LIBRARY_PREFIX </item>
<item> CMAKE_STATIC_LIBRARY_SUFFIX </item>
<item> CMAKE_STATIC_LINKER_FLAGS </item>
<item> CMAKE_SYSROOT </item>
<item> CMAKE_SYSTEM </item>
<item> CMAKE_SYSTEM_IGNORE_PATH </item>
<item> CMAKE_SYSTEM_INCLUDE_PATH </item>
@@ -778,6 +927,7 @@
<item> CMAKE_SYSTEM_PROCESSOR </item>
<item> CMAKE_SYSTEM_PROGRAM_PATH </item>
<item> CMAKE_SYSTEM_VERSION </item>
<item> CMAKE_TOOLCHAIN_FILE </item>
<item> CMAKE_TRY_COMPILE_CONFIGURATION </item>
<item> CMAKE_TWEAK_VERSION </item>
<item> CMAKE_USER_MAKE_RULES_OVERRIDE </item>
@@ -785,19 +935,84 @@
<item> CMAKE_VERBOSE_MAKEFILE </item>
<item> CMAKE_VERSION </item>
<item> CMAKE_VISIBILITY_INLINES_HIDDEN </item>
<item> CMAKE_VS_DEVENV_COMMAND </item>
<item> CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD </item>
<item> CMAKE_VS_INTEL_Fortran_PROJECT_VERSION </item>
<item> CMAKE_VS_MSBUILD_COMMAND </item>
<item> CMAKE_VS_MSDEV_COMMAND </item>
<item> CMAKE_VS_NsightTegra_VERSION </item>
<item> CMAKE_VS_PLATFORM_NAME </item>
<item> CMAKE_VS_PLATFORM_TOOLSET </item>
<item> CMAKE_WARN_DEPRECATED </item>
<item> CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION </item>
<item> CMAKE_WIN32_EXECUTABLE </item>
<item> CMAKE_XCODE_PLATFORM_TOOLSET </item>
<item> CPACK_ABSOLUTE_DESTINATION_FILES </item>
<item> CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY </item>
<item> CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION </item>
<item> CPACK_INCLUDE_TOPLEVEL_DIRECTORY </item>
<item> CPACK_INSTALL_SCRIPT </item>
<item> CPACK_PACKAGING_INSTALL_PREFIX </item>
<item> CPACK_SET_DESTDIR </item>
<item> CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION </item>
<item> CTEST_BINARY_DIRECTORY </item>
<item> CTEST_BUILD_COMMAND </item>
<item> CTEST_BUILD_NAME </item>
<item> CTEST_BZR_COMMAND </item>
<item> CTEST_BZR_UPDATE_OPTIONS </item>
<item> CTEST_CHECKOUT_COMMAND </item>
<item> CTEST_CONFIGURATION_TYPE </item>
<item> CTEST_CONFIGURE_COMMAND </item>
<item> CTEST_COVERAGE_COMMAND </item>
<item> CTEST_COVERAGE_EXTRA_FLAGS </item>
<item> CTEST_CURL_OPTIONS </item>
<item> CTEST_CVS_CHECKOUT </item>
<item> CTEST_CVS_COMMAND </item>
<item> CTEST_CVS_UPDATE_OPTIONS </item>
<item> CTEST_DROP_LOCATION </item>
<item> CTEST_DROP_METHOD </item>
<item> CTEST_DROP_SITE </item>
<item> CTEST_DROP_SITE_CDASH </item>
<item> CTEST_DROP_SITE_PASSWORD </item>
<item> CTEST_DROP_SITE_USER </item>
<item> CTEST_GIT_COMMAND </item>
<item> CTEST_GIT_UPDATE_CUSTOM </item>
<item> CTEST_GIT_UPDATE_OPTIONS </item>
<item> CTEST_HG_COMMAND </item>
<item> CTEST_HG_UPDATE_OPTIONS </item>
<item> CTEST_MEMORYCHECK_COMMAND </item>
<item> CTEST_MEMORYCHECK_COMMAND_OPTIONS </item>
<item> CTEST_MEMORYCHECK_SANITIZER_OPTIONS </item>
<item> CTEST_MEMORYCHECK_SUPPRESSIONS_FILE </item>
<item> CTEST_MEMORYCHECK_TYPE </item>
<item> CTEST_NIGHTLY_START_TIME </item>
<item> CTEST_P4_CLIENT </item>
<item> CTEST_P4_COMMAND </item>
<item> CTEST_P4_OPTIONS </item>
<item> CTEST_P4_UPDATE_OPTIONS </item>
<item> CTEST_SCP_COMMAND </item>
<item> CTEST_SITE </item>
<item> CTEST_SOURCE_DIRECTORY </item>
<item> CTEST_SVN_COMMAND </item>
<item> CTEST_SVN_OPTIONS </item>
<item> CTEST_SVN_UPDATE_OPTIONS </item>
<item> CTEST_TEST_TIMEOUT </item>
<item> CTEST_TRIGGER_SITE </item>
<item> CTEST_UPDATE_COMMAND </item>
<item> CTEST_UPDATE_OPTIONS </item>
<item> CTEST_UPDATE_VERSION_ONLY </item>
<item> CTEST_USE_LAUNCHERS </item>
<item> CYGWIN </item>
<item> ENV </item>
<item> EXECUTABLE_OUTPUT_PATH </item>
<item> GHS-MULTI </item>
<item> LIBRARY_OUTPUT_PATH </item>
<item> MINGW </item>
<item> MSVC </item>
<item> MSVC10 </item>
<item> MSVC11 </item>
<item> MSVC12 </item>
<item> MSVC14 </item>
<item> MSVC60 </item>
<item> MSVC70 </item>
<item> MSVC71 </item>
@@ -808,8 +1023,16 @@
<item> PROJECT_BINARY_DIR </item>
<item> PROJECT_NAME </item>
<item> PROJECT_SOURCE_DIR </item>
<item> PROJECT_VERSION </item>
<item> PROJECT_VERSION_MAJOR </item>
<item> PROJECT_VERSION_MINOR </item>
<item> PROJECT_VERSION_PATCH </item>
<item> PROJECT_VERSION_TWEAK </item>
<item> UNIX </item>
<item> WIN32 </item>
<item> WINCE </item>
<item> WINDOWS_PHONE </item>
<item> WINDOWS_STORE </item>
<item> XCODE_VERSION </item>
</list>
@@ -822,15 +1045,17 @@
</list>
<list name="generator_expr">
<!-- Logical Expressions -->
<item> 0 </item>
<item> 1 </item>
<item> CONFIG </item>
<item> BOOL </item>
<item> AND </item>
<item> OR </item>
<item> NOT </item>
<item> STREQUAL </item>
<item> JOIN </item>
<item> TARGET_NAME </item>
<item> INSTALL_INTERFACE </item>
<item> BUILD_INTERFACE </item>
<item> EQUAL </item>
<item> CONFIG </item>
<item> PLATFORM_ID </item>
<item> C_COMPILER_ID </item>
<item> CXX_COMPILER_ID </item>
<item> VERSION_GREATER </item>
@@ -838,22 +1063,39 @@
<item> VERSION_EQUAL </item>
<item> C_COMPILER_VERSION </item>
<item> CXX_COMPILER_VERSION </item>
<item> TARGET_FILE </item>
<item> TARGET_LINKER_FILE </item>
<item> TARGET_SONAME_FILE </item>
<item> TARGET_FILE_DIR </item>
<item> TARGET_FILE_NAME </item>
<item> TARGET_DIR </item>
<item> TARGET_LINKER_FILE_DIR </item>
<item> TARGET_LINKER_FILE_NAME </item>
<item> TARGET_SONAME_FILE_DIR </item>
<item> TARGET_SONAME_FILE_NAME </item>
<item> TARGET_PROPERTY </item>
<item> TARGET_OBJECTS </item>
<item> TARGET_POLICY </item>
<item> AND </item>
<item> OR </item>
<item> NOT </item>
<item> COMPILER_FEATURES </item>
<!-- Informational Expressions -->
<item> CONFIGURATION </item>
<item> TARGET_FILE </item>
<item> TARGET_FILE_NAME </item>
<item> TARGET_FILE_DIR </item>
<item> TARGET_LINKER_FILE </item>
<item> TARGET_LINKER_FILE_NAME </item>
<item> TARGET_LINKER_FILE_DIR </item>
<item> TARGET_SONAME_FILE </item>
<item> TARGET_SONAME_FILE_NAME </item>
<item> TARGET_SONAME_FILE_DIR </item>
<item> TARGET_PDB_FILE </item>
<item> TARGET_PDB_FILE_NAME </item>
<item> TARGET_PDB_FILE_DIR </item>
<item> TARGET_PROPERTY </item>
<item> INSTALL_PREFIX </item>
<!-- Output Expressions -->
<item> JOIN </item>
<item> ANGLE-R </item>
<item> COMMA </item>
<item> SEMICOLON </item>
<item> TARGET_NAME </item>
<item> LINK_ONLY </item>
<item> INSTALL_INTERFACE </item>
<item> BUILD_INTERFACE </item>
<item> LOWER_CASE </item>
<item> UPPER_CASE </item>
<item> MAKE_C_IDENTIFIER </item>
<item> TARGET_OBJECTS </item>
<!-- TODO Is this from CMake 2.x? -->
<item> TARGET_DIR </item>
</list>
<contexts>
@@ -878,34 +1120,45 @@
<RegExpr String="\bwhile\b" attribute="Commands" context="Command Args" beginRegion="while" insensitive="true" />
<RegExpr String="\bendwhile\b" attribute="Commands" context="Command Args" endRegion="while" insensitive="true" />
<keyword attribute="Commands" context="Command Args" String="commands" insensitive="true"/>
<keyword attribute="Third-Party Commands" context="#stay" String="itkvtk_commands" insensitive="true"/>
<RegExpr attribute="Region Marker" context="#stay" String="#\s*BEGIN.*$" beginRegion="block" firstNonSpace="true"/>
<RegExpr attribute="Region Marker" context="#stay" String="#\s*END.*$" endRegion="block" firstNonSpace="true"/>
<keyword attribute="Commands" context="Command Args" String="commands" insensitive="true" />
<keyword attribute="Third-Party Commands" context="#stay" String="itkvtk_commands" insensitive="true" />
<RegExpr attribute="Region Marker" context="#stay" String="#\s*BEGIN.*$" beginRegion="block" firstNonSpace="true" />
<RegExpr attribute="Region Marker" context="#stay" String="#\s*END.*$" endRegion="block" firstNonSpace="true" />
<RegExpr attribute="Region Marker" context="RST Documentation" String="^#\[(=*)\[\.rst:" column="0" />
<RegExpr attribute="Comment" context="Bracketed Comment" String="^#\[(=*)\[" column="0" />
<DetectChar attribute="Comment" context="Comment" char="#"/>
<IncludeRules context="Detect Variables"/>
<RegExpr attribute="Macros" context="Macro Args" String="\w+\s*(?=\()"/>
<DetectChar attribute="Comment" context="Comment" char="#" />
<IncludeRules context="Detect Variables" />
<RegExpr attribute="Macros" context="Macro Args" String="\w+\s*(?=\()" />
</context>
<!-- ATTENTION Do not change the context name! Or change a generation script accordingly -->
<context attribute="Normal Text" lineEndContext="#stay" name="Detect More Builtin Variables">
<!-- generated rules -->
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_ARCHIVE_OUTPUT_DIRECTORY_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_COMPILER_IS_GNU[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_DISABLE_FIND_PACKAGE_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_EXE_LINKER_FLAGS_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_LIBRARY_OUTPUT_DIRECTORY_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_MAP_IMPORTED_CONFIG_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_MODULE_LINKER_FLAGS_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_PDB_OUTPUT_DIRECTORY_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_POLICY_DEFAULT_CMP[0-9]+\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_POLICY_WARNING_CMP[0-9]+\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_PROJECT_[A-Za-z_][A-Za-z_0-9]*_INCLUDE\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_RUNTIME_OUTPUT_DIRECTORY_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_SHARED_LINKER_FLAGS_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_STATIC_LINKER_FLAGS_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_USER_MAKE_RULES_OVERRIDE_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_XCODE_ATTRIBUTE_[A-Za-z_][A-Za-z_0-9]*\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_ARCHIVE_APPEND\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_ARCHIVE_CREATE\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_ARCHIVE_FINISH\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_COMPILER\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_COMPILER_ABI\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_COMPILER_EXTERNAL_TOOLCHAIN\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_COMPILER_ID\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_COMPILER_LOADED\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_COMPILER_TARGET\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_COMPILER_VERSION\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_COMPILE_OBJECT\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_CREATE_SHARED_LIBRARY\b" />
@@ -916,68 +1169,82 @@
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_FLAGS_MINSIZEREL\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_FLAGS_RELEASE\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_FLAGS_RELWITHDEBINFO\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_GHS_KERNEL_FLAGS_DEBUG\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_GHS_KERNEL_FLAGS_MINSIZEREL\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_GHS_KERNEL_FLAGS_RELEASE\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_GHS_KERNEL_FLAGS_RELWITHDEBINFO\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_IGNORE_EXTENSIONS\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_IMPLICIT_INCLUDE_DIRECTORIES\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_IMPLICIT_LINK_DIRECTORIES\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_IMPLICIT_LINK_LIBRARIES\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_INCLUDE_WHAT_YOU_USE\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_LIBRARY_ARCHITECTURE\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_LINKER_PREFERENCE\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_LINKER_PREFERENCE_PROPAGATES\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_LINK_EXECUTABLE \b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_LINK_EXECUTABLE\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_OUTPUT_EXTENSION\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_PLATFORM_ID\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_POSTFIX\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_SIMULATE_ID\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_SIMULATE_VERSION\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_SIZEOF_DATA_PTR\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_SOURCE_FILE_EXTENSIONS\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\bCMAKE_[A-Za-z_][A-Za-z_0-9]*_VISIBILITY_PRESET\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\b[A-Za-z_][A-Za-z_0-9]*_BINARY_DIR\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\b[A-Za-z_][A-Za-z_0-9]*_SOURCE_DIR\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\b[A-Za-z_][A-Za-z_0-9]*_VERSION\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\b[A-Za-z_][A-Za-z_0-9]*_VERSION_MAJOR\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\b[A-Za-z_][A-Za-z_0-9]*_VERSION_MINOR\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\b[A-Za-z_][A-Za-z_0-9]*_VERSION_PATCH\b" />
<RegExpr attribute="Builtin CMake Variable" context="#stay" String="\b[A-Za-z_][A-Za-z_0-9]*_VERSION_TWEAK\b" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Detect Builtin Variables">
<keyword attribute="Builtin CMake Variable" context="#stay" String="cmake_vars" insensitive="false"/>
<keyword attribute="Builtin CMake Variable" context="#stay" String="cmake_vars" insensitive="false" />
<IncludeRules context="Detect More Builtin Variables" />
</context>
<context attribute="CMake Variable" lineEndContext="#pop" name="VarSubst">
<IncludeRules context="Detect Builtin Variables"/>
<IncludeRules context="Detect Builtin Variables" />
<DetectIdentifier />
<DetectChar attribute="CMake Variable" context="#pop" char="}"/>
<IncludeRules context="Detect Variables"/>
<DetectChar attribute="CMake Variable" context="#pop" char="}" />
<IncludeRules context="Detect Variables" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Detect Variables">
<RegExpr attribute="Environment Variable" context="#stay" String="\$ENV\{\s*[\w-]+\s*\}"/>
<RegExpr attribute="Environment Variable" context="#stay" String="\$ENV\{\s*[\w-]+\s*\}" />
<Detect2Chars attribute="CMake Variable" context="VarSubst" char="$" char1="{" />
</context>
<context attribute="Generator Expression" lineEndContext="#pop#pop" name="DetectSimpleGEEnd">
<DetectChar attribute="Generator Expression" context="#pop#pop" char="&gt;"/>
<DetectChar attribute="Generator Expression" context="#pop#pop" char="&gt;" />
</context>
<context attribute="Generator Expression" lineEndContext="#pop" name="Generator Expression">
<IncludeRules context="Detect Generator Expressions"/>
<DetectChar attribute="Generator Expression" context="#pop" char="&gt;"/>
<keyword attribute="Generator Expression Keyword" context="DetectSimpleGEEnd" String="simple_generator_expr" insensitive="false"/>
<keyword attribute="Generator Expression Keyword" context="#stay" String="generator_expr" insensitive="false"/>
<IncludeRules context="Detect Variables"/>
<IncludeRules context="Detect Generator Expressions" />
<DetectChar attribute="Generator Expression" context="#pop" char="&gt;" />
<keyword attribute="Generator Expression Keyword" context="DetectSimpleGEEnd" String="simple_generator_expr" insensitive="false" />
<keyword attribute="Generator Expression Keyword" context="#stay" String="generator_expr" insensitive="false" />
<IncludeRules context="Detect Variables" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Detect Generator Expressions">
<Detect2Chars attribute="Generator Expression" context="Generator Expression" char="$" char1="&lt;" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Command Args">
<keyword attribute="Special Args" context="#stay" String="special_args"/>
<keyword attribute="Special Args" context="#stay" String="extra_special_args"/>
<keyword attribute="Special Args" context="#stay" String="special_args" />
<keyword attribute="Special Args" context="#stay" String="extra_special_args" />
<!-- NOTE Handle CMP<NNN> as a special arg -->
<RegExpr attribute="Special Args" context="#stay" String="\bCMP[0-9]+\b" />
<keyword attribute="Properties" context="#stay" String="properties"/>
<keyword attribute="Properties" context="#stay" String="extra_properties"/>
<IncludeRules context="Detect Builtin Variables"/>
<IncludeRules context="Macro Args"/>
<keyword attribute="Properties" context="#stay" String="properties" />
<keyword attribute="Properties" context="#stay" String="extra_properties" />
<IncludeRules context="Detect Builtin Variables" />
<IncludeRules context="Macro Args" />
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="Macro Args">
<DetectChar attribute="Normal Text" context="#pop" char=")"/>
<RegExpr attribute="Escapes" context="#stay" String="\\[&quot;$n\\]"/>
<DetectChar attribute="Strings" context="String" char="&quot;"/>
<DetectChar attribute="Normal Text" context="#pop" char=")" />
<RegExpr attribute="Escapes" context="#stay" String="\\[&quot;$n\\]" />
<DetectChar attribute="Strings" context="String" char="&quot;" />
<RegExpr attribute="Strings" context="Bracketed String" String="\[(=*)\[" />
<DetectChar attribute="Comment" context="Comment" char="#"/>
<IncludeRules context="Detect Builtin Variables"/>
<IncludeRules context="Detect Variables"/>
<IncludeRules context="Detect Generator Expressions"/>
<DetectChar attribute="Comment" context="Comment" char="#" />
<IncludeRules context="Detect Builtin Variables" />
<IncludeRules context="Detect Variables" />
<IncludeRules context="Detect Generator Expressions" />
</context>
<context attribute="Comment" lineEndContext="#pop" name="Comment">
<LineContinue attribute="Comment" context="#pop" />
@@ -995,26 +1262,26 @@
<context attribute="Strings" lineEndContext="#stay" name="String">
<RegExpr attribute="Strings" context="#pop" String="&quot;(?=[ );]|$)" />
<RegExpr attribute="Escapes" context="#stay" String="\\[&quot;$nrt\\]" />
<IncludeRules context="Detect Variables"/>
<IncludeRules context="Detect Generator Expressions"/>
<IncludeRules context="Detect Variables" />
<IncludeRules context="Detect Generator Expressions" />
</context>
<context attribute="Strings" lineEndContext="#stay" name="Bracketed String" dynamic="true">
<RegExpr attribute="Strings" context="#pop" String="\]%1\]" dynamic="true" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Special Args" defStyleNum="dsOthers" spellChecking="false" />
<itemData name="Properties" defStyleNum="dsOthers" spellChecking="false" />
<itemData name="Commands" defStyleNum="dsKeyword" spellChecking="false" />
<itemData name="Third-Party Commands" defStyleNum="dsFunction" spellChecking="false" />
<itemData name="Third-Party Commands" defStyleNum="dsExtension" spellChecking="false" />
<itemData name="Macros" defStyleNum="dsFunction" spellChecking="false" />
<itemData name="Strings" defStyleNum="dsString" spellChecking="true" />
<itemData name="Escapes" defStyleNum="dsChar" spellChecking="false" />
<itemData name="Builtin CMake Variable" defStyleNum="dsDecVal" color="#c09050" selColor="#c09050" spellChecking="false" />
<itemData name="Escapes" defStyleNum="dsSpecialChar" spellChecking="false" />
<itemData name="Builtin CMake Variable" defStyleNum="dsVariable" spellChecking="false" />
<!-- TODO Rename to "Variable Substitution" -->
<itemData name="CMake Variable" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="CMake Variable" defStyleNum="dsVariable" spellChecking="false" />
<!-- TODO Rename to "Environment Variable Substitution" -->
<itemData name="Environment Variable" defStyleNum="dsFloat" spellChecking="false" />
<itemData name="Generator Expression Keyword" defStyleNum="dsKeyword" color="#b84040" selColor="#b84040" spellChecking="false" />
@@ -1022,12 +1289,13 @@
<itemData name="Comment" defStyleNum="dsComment" spellChecking="true" />
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="#"/>
<comment name="singleLine" start="#" />
</comments>
<keywords casesensitive="1"/>
<keywords casesensitive="1" />
</general>
</language>

View File

@@ -23,7 +23,7 @@ Changelog:
-->
<language name="CSS" version="2.10" kateversion="3.4" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<language name="CSS" version="2.12" kateversion="5.0" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
<highlighting>
<list name="properties">
@@ -214,6 +214,7 @@ Changelog:
<item> transition </item>
<item> transition-property </item>
<item> transition-duration </item>
<item> word-break </item>
<item> word-wrap </item>
<!-- Gecko rendering engine CSS property extensions -->
@@ -901,7 +902,7 @@ Changelog:
<itemData name="String" defStyleNum="dsString"/>
<itemData name="Value" defStyleNum="dsDataType" spellChecking="false"/>
<itemData name="Important" defStyleNum="dsKeyword" spellChecking="false"/>
<itemData name="Selector Attr" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="Selector Attr" defStyleNum="dsAttribute" spellChecking="false"/>
<itemData name="Selector Id" defStyleNum="dsFloat" bold="1" spellChecking="false"/>
<itemData name="Selector Class" defStyleNum="dsFloat" spellChecking="false"/>
<itemData name="Selector Pseudo" defStyleNum="dsDecVal" spellChecking="false"/>

View File

@@ -29,8 +29,8 @@
-->
<language name="Doxygen"
version="1.38"
kateversion="2.4"
version="1.39"
kateversion="5.0"
section="Markup"
extensions="*.dox;*.doxygen"
mimetype="text/x-doxygen"
@@ -485,9 +485,9 @@
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" />
<itemData name="Tags" defStyleNum="dsKeyword" color="#ca60ca" bold="1" italic="0" />
<itemData name="Tags" defStyleNum="dsAnnotation" bold="1" italic="0" />
<itemData name="Custom Tags" defStyleNum="dsNormal" color="#458C61" bold="1" italic="0" />
<itemData name="Word" defStyleNum="dsKeyword" color="#0095ff" bold="1" italic="0" />
<itemData name="Word" defStyleNum="dsCommentVar" bold="1" italic="0" />
<itemData name="HTML Tag" defStyleNum="dsKeyword" color="#000000" bold="1" italic="0" />
<itemData name="Entities" defStyleNum="dsOthers" color="#4086C0" bold="1" italic="1" />
<itemData name="Description" defStyleNum="dsString" color="#ff0000" />
@@ -501,10 +501,10 @@
<itemData name="Formulas" defStyleNum="dsComment" color="#00A000" selColor="#ffffff" italic="1" />
<itemData name="Message Sequence Chart" defStyleNum="dsComment" color="#00A000" selColor="#ffffff" italic="1" />
<itemData name="Verbatim" defStyleNum="dsComment" />
<itemData name="Note" defStyleNum="dsKeyword" color="#81ca2d" selColor="#81ca2d" bold="1" italic="0" />
<itemData name="Warning" defStyleNum="dsKeyword" color="#ca9219" selColor="#ca9219" bold="1" italic="0" />
<itemData name="Attention" defStyleNum="dsKeyword" color="#e85848" selColor="#e85848" bold="1" italic="0" />
<itemData name="Todo" defStyleNum="dsKeyword" color="#ca60ca" selColor="#ffffff" bold="1" italic="0" />
<itemData name="Note" defStyleNum="dsInformation" bold="1" italic="0" />
<itemData name="Warning" defStyleNum="dsWarning" bold="1" italic="0" />
<itemData name="Attention" defStyleNum="dsAnnotation" bold="1" italic="0" />
<itemData name="Todo" defStyleNum="dsAnnotation" bold="1" italic="0" />
</itemDatas>
</highlighting>
<general>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Java" version="1.21" kateversion="2.4" section="Sources" extensions="*.java" mimetype="text/x-java" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
<language name="Java" version="1.22" kateversion="5.0" section="Sources" extensions="*.java" mimetype="text/x-java" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
<highlighting>
<list name="java15">
<item> ACTIVE </item>
@@ -3828,24 +3828,24 @@
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Annotation" defStyleNum="dsFunction"/>
<itemData name="Function" defStyleNum="dsFunction"/>
<itemData name="StaticImports" defStyleNum="dsKeyword" color="#800080" selColor="#FFFFFF" bold="0" italic="0"/>
<itemData name="Imports" defStyleNum="dsKeyword" color="#808000" selColor="#FFFFFF" bold="0" italic="0"/>
<itemData name="Data Type" defStyleNum="dsDataType"/>
<itemData name="Decimal" defStyleNum="dsDecVal"/>
<itemData name="Octal" defStyleNum="dsBaseN"/>
<itemData name="Hex" defStyleNum="dsBaseN"/>
<itemData name="Float" defStyleNum="dsFloat"/>
<itemData name="Char" defStyleNum="dsChar"/>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
<itemData name="Annotation" defStyleNum="dsAttribute" spellChecking="false"/>
<itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>
<itemData name="StaticImports" defStyleNum="dsImport" spellChecking="false"/>
<itemData name="Imports" defStyleNum="dsImport" spellChecking="false"/>
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
<itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="String Char" defStyleNum="dsChar"/>
<itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false"/>
<itemData name="PrintfString" defStyleNum="dsString"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Symbol" defStyleNum="dsNormal"/>
<itemData name="Java15" defStyleNum="dsNormal" color="#0095FF" selColor="#FFFFFF" bold="1" italic="0"/>
<itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false"/>
<itemData name="Java15" defStyleNum="dsBuiltIn" spellChecking="false"/>
</itemDatas>
</highlighting>
<general>

View File

@@ -39,7 +39,7 @@
Enhance tr/// and y/// support.
-->
<language name="Perl" version="1.31" kateversion="2.4" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPL">
<language name="Perl" version="1.32" kateversion="2.4" section="Scripts" extensions="*.pl;*.PL;*.pm" mimetype="application/x-perl;text/x-perl" priority="5" author="Anders Lund (anders@alweb.dk)" license="LGPL">
<highlighting>
<list name="keywords">
<item> if </item>
@@ -658,7 +658,7 @@
<DetectChar attribute="Pattern Internal Operator" context="#stay" char="^" />
<Detect2Chars attribute="Pattern Character Class" context="#stay" char="\" char1="\" />
<Detect2Chars attribute="Pattern Character Class" context="#stay" char="\" char1="]" />
<RegExpr attribute="Pattern Character Class" context="#stay" String="\[:^?[a-z]+:\]" />
<RegExpr attribute="Pattern Character Class" context="#stay" String="\[:\^?[a-z]+:\]" />
<DetectChar attribute="Pattern Internal Operator" context="#pop" char="]" />
</context>

View File

@@ -134,7 +134,7 @@
<itemData name="Doctype" defStyleNum="dsDataType" bold="1" spellChecking="false" />
<itemData name="Element" defStyleNum="dsKeyword" spellChecking="false" />
<itemData name="Attribute" defStyleNum="dsOthers" spellChecking="false" />
<itemData name="Value" defStyleNum="dsString" spellChecking="false" />
<itemData name="Value" defStyleNum="dsString" color="#a00" spellChecking="false" />
<itemData name="EntityRef" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="PEntityRef" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="Error" defStyleNum="dsError" spellChecking="false" />

View File

@@ -1,5 +1,4 @@
#ifndef %PluginName:u%_%CppHeaderSuffix:u%
#define %PluginName:u%_%CppHeaderSuffix:u%
#pragma once
#include "%PluginName:l%_global.%CppHeaderSuffix%"
@@ -27,5 +26,3 @@ private slots:
} // namespace Internal
} // namespace %PluginName%
#endif // %PluginName:u%_%CppHeaderSuffix:u%

View File

@@ -1,5 +1,4 @@
#ifndef %PluginName:u%_GLOBAL_%CppHeaderSuffix:u%
#define %PluginName:u%_GLOBAL_%CppHeaderSuffix:u%
#pragma once
#include <QtGlobal>
@@ -8,5 +7,3 @@
#else
# define %PluginName:u%SHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // %PluginName:u%_GLOBAL_H

View File

@@ -1,5 +1,4 @@
#ifndef %PluginName:u%CONSTANTS_%CppHeaderSuffix:u%
#define %PluginName:u%CONSTANTS_%CppHeaderSuffix:u%
#pragma once
namespace %PluginName% {
namespace Constants {
@@ -9,5 +8,3 @@ const char MENU_ID[] = "%PluginName%.Menu";
} // namespace %PluginName%
} // namespace Constants
#endif // %PluginName:u%CONSTANTS_%CppHeaderSuffix:u%

View File

@@ -91,7 +91,7 @@ PanelTextColorMid=ffa0a0a0
PanelTextColorLight=text
ProgressBarColorError=error
ProgressBarColorFinished=ff5aaa3c
ProgressBarColorNormal=hoverBackground
ProgressBarColorNormal=ff808080
ProgressBarTitleColor=text
SplitterColor=ff313131
TextColorDisabled=textDisabled
@@ -168,12 +168,13 @@ ClangCodeModel_Warning_TextMarkColor=ffceff40
ComboBoxDrawTextShadow=false
DerivePaletteFromTheme=true
DrawIndicatorBranch=true
DrawProgressBarSunken=false
DrawSearchResultWidgetFrame=false
DrawTargetSelectorBottom=false
DrawToolBarHighlights=true
ApplyThemePaletteGlobally=true
FlatSideBarIcons=true
FlatProjectsMode=true
FlatMenuBar=true
[Gradients]
DetailsWidgetHeaderGradient\1\color=0

View File

@@ -1,6 +1,6 @@
[General]
ThemeName=Dark Frame
PreferredStyles=Fusion
PreferredStyles=
[Palette]
shadowBackground=ff404244
@@ -22,10 +22,10 @@ BackgroundColorHover=hoverBackground
BackgroundColorNormal=normalBackground
BackgroundColorDisabled=ff444444
BackgroundColorSelected=ff909090
BadgeLabelBackgroundColorChecked=normalBackground
BadgeLabelBackgroundColorUnchecked=selectedBackground
BadgeLabelTextColorChecked=text
BadgeLabelTextColorUnchecked=text
BadgeLabelBackgroundColorChecked=ffe0e0e0
BadgeLabelBackgroundColorUnchecked=ff808080
BadgeLabelTextColorChecked=ff606060
BadgeLabelTextColorUnchecked=ffffffff
CanceledSearchTextColor=ff0000
ComboBoxArrowColor=toolBarItem
ComboBoxArrowColorDisabled=toolBarItemDisabled
@@ -41,7 +41,7 @@ DoubleTabWidget2ndSeparatorColor=ffff0000
DoubleTabWidget2ndTabActiveTextColor=ffffffff
DoubleTabWidget2ndTabBackgroundColor=ffff0000
DoubleTabWidget2ndTabInactiveTextColor=ff000000
EditorPlaceholderColor=normalBackground
EditorPlaceholderColor=ffdddddd
FancyToolBarSeparatorColor=43ffffff
FancyTabBarBackgroundColor=shadowBackground
FancyTabWidgetDisabledSelectedTextColor=toolBarItemDisabled
@@ -77,8 +77,8 @@ InfoBarBackground=ffffffe1
InfoBarText=text
MenuBarEmptyAreaBackgroundColor=shadowBackground
MenuBarItemBackgroundColor=shadowBackground
MenuBarItemTextColorDisabled=toolBarItemDisabled
MenuBarItemTextColorNormal=toolBarItem
MenuBarItemTextColorDisabled=textDisabled
MenuBarItemTextColorNormal=text
MenuItemTextColorDisabled=textDisabled
MenuItemTextColorNormal=text
MiniProjectTargetSelectorBackgroundColor=shadowBackground
@@ -91,9 +91,9 @@ PanelsWidgetSeparatorLineColor=0
PanelTextColorDark=text
PanelTextColorMid=ff666666
PanelTextColorLight=toolBarItem
ProgressBarColorError=error
ProgressBarColorFinished=ff5aaa3c
ProgressBarColorNormal=hoverBackground
ProgressBarColorError=ffdb6f71
ProgressBarColorFinished=dda4d576
ProgressBarColorNormal=ff999999
ProgressBarTitleColor=toolBarItem
SplitterColor=splitter
TextColorDisabled=textDisabled
@@ -109,13 +109,13 @@ TreeViewArrowColorNormal=hoverBackground
TreeViewArrowColorSelected=text
OutputPanes_DebugTextColor=text
OutputPanes_ErrorMessageTextColor=ffff6c6c
OutputPanes_MessageOutput=ff008787
OutputPanes_NormalMessageTextColor=text
OutputPanes_StdErrTextColor=ffff6666
OutputPanes_StdOutTextColor=text
OutputPanes_WarningMessageTextColor=fff3c300
OutputPaneButtonFlashColor=error
OutputPanes_ErrorMessageTextColor=ffaa0000
OutputPanes_MessageOutput=ff0000aa
OutputPanes_NormalMessageTextColor=ff0000aa
OutputPanes_StdErrTextColor=ffaa0000
OutputPanes_StdOutTextColor=ff000000
OutputPanes_WarningMessageTextColor=ff808000
OutputPaneButtonFlashColor=ffff0000
OutputPaneToggleButtonTextColorChecked=toolBarItem
OutputPaneToggleButtonTextColorUnchecked=toolBarItem
@@ -149,33 +149,34 @@ Welcome_SideBar_BackgroundColor=normalBackground
Welcome_TextColorHeading=text
Welcome_TextColorNormal=text
VcsBase_FileStatusUnknown_TextColor=text
VcsBase_FileAdded_TextColor=ff00ff00
VcsBase_FileModified_TextColor=ff8ee0ff
VcsBase_FileDeleted_TextColor=fffff6c6c
VcsBase_FileRenamed_TextColor=ffffa500
VcsBase_FileStatusUnknown_TextColor=ff000000
VcsBase_FileAdded_TextColor=ff00aa00
VcsBase_FileModified_TextColor=ff0000ee
VcsBase_FileDeleted_TextColor=ffee0000
VcsBase_FileRenamed_TextColor=ffd77d00
Bookmarks_TextMarkColor=ff8080ff
Bookmarks_TextMarkColor=ffa0a0ff
TextEditor_SearchResult_ScrollBarColor=ff00c000
TextEditor_CurrentLine_ScrollBarColor=ffffffff
TextEditor_CurrentLine_ScrollBarColor=ff404040
ProjectExplorer_TaskError_TextMarkColor=ffff4040
ProjectExplorer_TaskWarn_TextMarkColor=ffffff40
ProjectExplorer_TaskError_TextMarkColor=ffff0000
ProjectExplorer_TaskWarn_TextMarkColor=ffffa500
ClangCodeModel_Error_TextMarkColor=ffff882f
ClangCodeModel_Warning_TextMarkColor=ffceff40
ClangCodeModel_Warning_TextMarkColor=ffc6c132
[Flags]
ComboBoxDrawTextShadow=false
DerivePaletteFromTheme=false
DrawIndicatorBranch=true
DrawProgressBarSunken=false
DrawSearchResultWidgetFrame=false
DrawTargetSelectorBottom=false
DrawToolBarHighlights=false
ApplyThemePaletteGlobally=false
FlatSideBarIcons=true
FlatProjectsMode=false
FlatMenuBar=false
[Gradients]
DetailsWidgetHeaderGradient\1\color=0

View File

@@ -162,12 +162,13 @@ ClangCodeModel_Warning_TextMarkColor=ffc6c132
ComboBoxDrawTextShadow=true
DerivePaletteFromTheme=false
DrawIndicatorBranch=false
DrawProgressBarSunken=true
DrawSearchResultWidgetFrame=true
DrawTargetSelectorBottom=true
DrawToolBarHighlights=true
ApplyThemePaletteGlobally=false
FlatSideBarIcons=false
FlatProjectsMode=false
FlatMenuBar=false
[Gradients]
DetailsWidgetHeaderGradient\1\color=ffffff

View File

@@ -49,6 +49,8 @@ class Style;
class ClassItem : public ObjectItem, public IRelationable
{
Q_DECLARE_TR_FUNCTIONS(qmt::ClassItem)
public:
ClassItem(DClass *klass, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent = 0);
~ClassItem() override;

View File

@@ -70,7 +70,7 @@ class ObjectItem :
public IAlignable,
public IEditable
{
Q_DECLARE_TR_FUNCTIONS(ObjectItem)
Q_DECLARE_TR_FUNCTIONS(qmt::ObjectItem)
protected:
enum ResizeFlags {

View File

@@ -36,8 +36,6 @@
#include <QGraphicsScene>
#include <QPainter>
#include <QDebug>
namespace qmt {
RelationStarter::RelationStarter(IRelationable *owner, DiagramSceneModel *diagramSceneModel, QGraphicsItem *parent)
@@ -93,7 +91,8 @@ void RelationStarter::addArrow(const QString &id, ArrowItem::Shaft shaft,
void RelationStarter::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
m_currentPreviewArrow = 0;
if (m_currentPreviewArrow)
return;
foreach (ArrowItem *item, m_arrows) {
if (item->boundingRect().contains(mapToItem(item, event->pos()))) {
prepareGeometryChange();
@@ -148,6 +147,17 @@ void RelationStarter::keyPressEvent(QKeyEvent *event)
}
}
void RelationStarter::focusOutEvent(QFocusEvent *event)
{
Q_UNUSED(event);
if (m_currentPreviewArrow) {
m_currentPreviewArrow->scene()->removeItem(m_currentPreviewArrow);
delete m_currentPreviewArrow;
m_currentPreviewArrow = 0;
m_currentPreviewArrowIntermediatePoints.clear();
}
}
void RelationStarter::updateCurrentPreviewArrow(const QPointF &headPoint)
{
prepareGeometryChange();

View File

@@ -56,6 +56,7 @@ protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
void keyPressEvent(QKeyEvent *event) override;
void focusOutEvent(QFocusEvent *event) override;
private:
void updateCurrentPreviewArrow(const QPointF &headPoint);

View File

@@ -44,6 +44,10 @@ Rectangle {
property bool selectionRangeMode: false
property bool selectionRangeReady: selectionRange.ready
property int typeId: content.typeId
onWidthChanged: {
zoomSliderToolBar.updateZoomLevel();
content.scroll();
}
color: "#dcdcdc"

View File

@@ -314,6 +314,12 @@ void BaseTreeView::mousePressEvent(QMouseEvent *ev)
d->toggleColumnWidth(columnAt(ev->x()));
}
void BaseTreeView::showEvent(QShowEvent *ev)
{
emit aboutToShow();
TreeView::showEvent(ev);
}
/*!
Shows a round spinning progress indicator on top of the tree view.
Creates a progress indicator widget if necessary.

View File

@@ -51,14 +51,19 @@ public:
void setSettings(QSettings *settings, const QByteArray &key);
QModelIndexList activeRows() const;
void setModel(QAbstractItemModel *model);
virtual void rowActivated(const QModelIndex &) {}
virtual void rowClicked(const QModelIndex &) {}
void mousePressEvent(QMouseEvent *ev);
void setModel(QAbstractItemModel *model) override;
void mousePressEvent(QMouseEvent *ev) override;
void showEvent(QShowEvent *ev) override;
void showProgressIndicator();
void hideProgressIndicator();
signals:
void aboutToShow();
public slots:
void setAlternatingRowColorsHelper(bool on) { setAlternatingRowColors(on); }

View File

@@ -72,7 +72,8 @@ void ProxyAction::disconnectAction()
void ProxyAction::connectAction()
{
if (m_action) {
connect(m_action.data(), &QAction::changed, this, &ProxyAction::actionChanged);
connect(m_action.data(), &QAction::changed, this, &ProxyAction::actionChanged,
Qt::QueuedConnection);
connect(this, &QAction::triggered, m_action.data(), &QAction::triggered);
connect(this, &ProxyAction::toggled, m_action.data(), &QAction::setChecked);
}

View File

@@ -254,13 +254,14 @@ public:
enum Flag {
DrawTargetSelectorBottom,
DrawSearchResultWidgetFrame,
DrawProgressBarSunken,
DrawIndicatorBranch,
DrawToolBarHighlights,
ComboBoxDrawTextShadow,
DerivePaletteFromTheme,
ApplyThemePaletteGlobally,
FlatSideBarIcons,
FlatProjectsMode
FlatProjectsMode,
FlatMenuBar
};
enum WidgetStyle {

View File

@@ -523,6 +523,10 @@ FileName AndroidConfig::gccPath(const Abi &abi, const QString &ndkToolChainVersi
FileName AndroidConfig::gdbPath(const Abi &abi, const QString &ndkToolChainVersion) const
{
const auto gdbPath = QString::fromLatin1("%1/prebuilt/%2/bin/gdb" QTC_HOST_EXE_SUFFIX).arg(m_ndkLocation.toString()).arg(toolchainHost());
if (QFile::exists(gdbPath))
return FileName::fromString(gdbPath);
return toolPath(abi, ndkToolChainVersion).appendString(QLatin1String("-gdb" QTC_HOST_EXE_SUFFIX));
}

View File

@@ -24,8 +24,10 @@
****************************************************************************/
#include "autotestconstants.h"
#include "autotestplugin.h"
#include "autotestunittests.h"
#include "testcodeparser.h"
#include "testsettings.h"
#include "testtreemodel.h"
#include <cpptools/cppmodelmanager.h>
@@ -40,8 +42,6 @@
#include <QSignalSpy>
#include <QTest>
#include <coreplugin/navigationwidget.h>
#include <qtsupport/qtkitinformation.h>
using namespace Core;
@@ -73,10 +73,17 @@ void AutoTestUnitTests::initTestCase()
QSKIP("This test requires that there is a kit with a toolchain.");
m_tmpDir = new CppTools::Tests::TemporaryCopiedDir(QLatin1String(":/unit_test"));
m_originalAlwaysParse = AutotestPlugin::instance()->settings()->alwaysParse;
if (!m_originalAlwaysParse) {
AutotestPlugin::instance()->settings()->alwaysParse = true;
TestTreeModel::instance()->enableParsingFromSettings();
}
}
void AutoTestUnitTests::cleanupTestCase()
{
AutotestPlugin::instance()->settings()->alwaysParse = m_originalAlwaysParse;
delete m_tmpDir;
}
@@ -88,9 +95,6 @@ void AutoTestUnitTests::testCodeParser()
QFETCH(int, expectedUnnamedQuickTestsCount);
QFETCH(int, expectedDataTagsCount);
NavigationWidget *navigation = NavigationWidget::instance();
navigation->activateSubWidget(Constants::AUTOTEST_ID);
CppTools::Tests::ProjectOpenerAndCloser projectManager;
const CppTools::ProjectInfo projectInfo = projectManager.open(projectFilePath, true);
QVERIFY(projectInfo.isValid());
@@ -140,9 +144,6 @@ void AutoTestUnitTests::testCodeParserSwitchStartup()
QFETCH(QList<int>, expectedUnnamedQuickTestsCount);
QFETCH(QList<int>, expectedDataTagsCount);
NavigationWidget *navigation = NavigationWidget::instance();
navigation->activateSubWidget(Constants::AUTOTEST_ID);
CppTools::Tests::ProjectOpenerAndCloser projectManager;
for (int i = 0; i < projectFilePaths.size(); ++i) {
qDebug() << "Opening project" << projectFilePaths.at(i);
@@ -193,9 +194,6 @@ void AutoTestUnitTests::testCodeParserGTest()
if (qgetenv("GOOGLETEST_DIR").isEmpty())
QSKIP("This test needs googletest - set GOOGLETEST_DIR (point to googletest repository)");
NavigationWidget *navigation = NavigationWidget::instance();
navigation->activateSubWidget(Constants::AUTOTEST_ID);
CppTools::Tests::ProjectOpenerAndCloser projectManager;
CppTools::ProjectInfo projectInfo = projectManager.open(
QString(m_tmpDir->path() + QLatin1String("/simple_gt/simple_gt.pro")), true);

View File

@@ -57,6 +57,7 @@ private:
TestTreeModel *m_model;
CppTools::Tests::TemporaryCopiedDir *m_tmpDir;
bool m_isQt4;
bool m_originalAlwaysParse;
};
} // namespace Internal

View File

@@ -507,7 +507,7 @@ static void handleGTest(QFutureInterface<TestParseResult> futureInterface, const
static void checkDocumentForTestCode(QFutureInterface<TestParseResult> futureInterface,
CPlusPlus::Document::Ptr document,
QMap<QString, QString> testCaseNames)
QHash<QString, QString> testCaseNames)
{
const QString fileName = document->fileName();
const CppTools::CppModelManager *modelManager = CppTools::CppModelManager::instance();
@@ -567,7 +567,7 @@ static void checkDocumentForTestCode(QFutureInterface<TestParseResult> futureInt
static bool parsingHasFailed;
static void performParse(QFutureInterface<TestParseResult> &futureInterface,
const QStringList &list, const QMap<QString, QString> testCaseNames)
const QStringList &list, const QHash<QString, QString> testCaseNames)
{
int progressValue = 0;
futureInterface.setProgressRange(0, list.size());
@@ -718,7 +718,7 @@ void TestCodeParser::scanForTests(const QStringList &fileList)
parsingHasFailed = false;
QMap<QString, QString> testCaseNames;
QHash<QString, QString> testCaseNames;
if (isFullParse) {
// remove qml files as they will be found automatically by the referencing cpp file
list = Utils::filtered(list, [] (const QString &fn) {

View File

@@ -72,7 +72,7 @@ private:
m_typeAreaWidth = QFontMetrics(options.font).width(QLatin1String("XXXXXXXX"));
m_indentation = options.widget ? options.widget->style()->pixelMetric(
QStyle::PM_TreeViewIndentation, &options) : 0;
m_level = srcModel->hasChildren(filterModel->mapToSource(options.index)) ? 1 : 2;
m_level = filterModel->mapToSource(options.index).parent() == srcModel->rootItem()->index() ? 1 : 2;
int flexibleArea = lineAreaLeft() - textAreaLeft() - ITEM_SPACING;
if (m_maxFileLength > flexibleArea / 2)
m_realFileLength = flexibleArea / 2;

View File

@@ -39,6 +39,7 @@
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorericons.h>
#include <texteditor/texteditor.h>
@@ -137,6 +138,9 @@ TestResultsPane::TestResultsPane(QObject *parent) :
this, &TestResultsPane::onTestRunFinished);
connect(TestRunner::instance(), &TestRunner::testResultReady,
this, &TestResultsPane::addTestResult);
connect(ProjectExplorer::ProjectExplorerPlugin::instance(),
&ProjectExplorer::ProjectExplorerPlugin::updateRunActions,
this, &TestResultsPane::updateRunActions);
}
void TestResultsPane::createToolButtons()
@@ -209,6 +213,8 @@ void TestResultsPane::addTestResult(const TestResultPtr &result)
m_model->addTestResult(result, m_expandCollapse->isChecked());
if (!m_treeView->isVisible())
popup(Core::IOutputPane::NoModeSwitch);
setIconBadgeNumber(m_model->resultTypeCount(Result::Fail)
+ m_model->resultTypeCount(Result::UnexpectedPass));
flash();
navigateStateChanged();
}
@@ -242,6 +248,7 @@ int TestResultsPane::priorityInStatusBar() const
void TestResultsPane::clearContents()
{
m_filterModel->clearTestResults();
setIconBadgeNumber(0);
navigateStateChanged();
m_summaryWidget->setVisible(false);
m_autoScroll = AutotestPlugin::instance()->settings()->autoScroll;
@@ -255,13 +262,13 @@ void TestResultsPane::visibilityChanged(bool visible)
return;
if (visible) {
connect(TestTreeModel::instance(), &TestTreeModel::testTreeModelChanged,
this, &TestResultsPane::onTestTreeModelChanged);
this, &TestResultsPane::updateRunActions);
// make sure run/run all are in correct state
onTestTreeModelChanged();
updateRunActions();
TestTreeModel::instance()->enableParsing();
} else {
disconnect(TestTreeModel::instance(), &TestTreeModel::testTreeModelChanged,
this, &TestResultsPane::onTestTreeModelChanged);
this, &TestResultsPane::updateRunActions);
TestTreeModel::instance()->disableParsing();
}
m_wasVisibleBefore = visible;
@@ -507,9 +514,12 @@ void TestResultsPane::onScrollBarRangeChanged(int, int max)
m_treeView->verticalScrollBar()->setValue(max);
}
void TestResultsPane::onTestTreeModelChanged()
void TestResultsPane::updateRunActions()
{
const bool enable = TestTreeModel::instance()->hasTests();
QString whyNot;
const bool enable = TestTreeModel::instance()->hasTests()
&& ProjectExplorer::ProjectExplorerPlugin::canRunStartupProject(
ProjectExplorer::Constants::NORMAL_RUN_MODE, &whyNot);
m_runAll->setEnabled(enable);
m_runSelected->setEnabled(enable);
}

View File

@@ -108,7 +108,7 @@ private:
void onTestRunStarted();
void onTestRunFinished();
void onScrollBarRangeChanged(int, int max);
void onTestTreeModelChanged();
void updateRunActions();
void onCustomContextMenuRequested(const QPoint &pos);
void onCopyItemTriggered(const QModelIndex &idx);
void onCopyWholeTriggered();

View File

@@ -42,7 +42,7 @@ TestTreeItem::TestTreeItem(const QString &name, const QString &filePath, Type ty
m_filePath(filePath),
m_type(type),
m_line(0),
m_markedForRemoval(false)
m_status(NewlyAdded)
{
m_checked = (m_type == TestCase || m_type == TestFunctionOrSet) ? Qt::Checked : Qt::Unchecked;
}
@@ -207,12 +207,12 @@ Qt::CheckState TestTreeItem::checked() const
void TestTreeItem::markForRemoval(bool mark)
{
m_markedForRemoval = mark;
m_status = mark ? MarkedForRemoval : Cleared;
}
void TestTreeItem::markForRemovalRecursively(bool mark)
{
m_markedForRemoval = mark;
markForRemoval(mark);
for (int row = 0, count = childCount(); row < count; ++row)
childItem(row)->markForRemovalRecursively(mark);
}

View File

@@ -90,7 +90,8 @@ public:
Type type() const { return m_type; }
void markForRemoval(bool mark);
void markForRemovalRecursively(bool mark);
bool markedForRemoval() const { return m_markedForRemoval; }
bool markedForRemoval() const { return m_status == MarkedForRemoval; }
bool newlyAdded() const { return m_status == NewlyAdded; }
TestTreeItem *parentItem() const;
TestTreeItem *childItem(int row) const;
@@ -114,6 +115,13 @@ private:
void revalidateCheckState();
bool modifyName(const QString &name);
enum Status
{
NewlyAdded,
MarkedForRemoval,
Cleared
};
QString m_name;
QString m_filePath;
Qt::CheckState m_checked;
@@ -121,7 +129,7 @@ private:
unsigned m_line;
unsigned m_column;
QString m_proFile;
bool m_markedForRemoval;
Status m_status;
};
typedef QVector<TestCodeLocationAndType> TestCodeLocationList;

View File

@@ -253,7 +253,7 @@ QList<TestConfiguration *> TestTreeModel::getAllTestCases() const
}
// get all Quick Tests
QMap<QString, int> foundProFiles;
QHash<QString, int> foundProFiles;
for (int row = 0, count = m_quickTestRootItem->childCount(); row < count; ++row) {
const TestTreeItem *child = m_quickTestRootItem->childItem(row);
// unnamed Quick Tests must be handled separately
@@ -270,13 +270,16 @@ QList<TestConfiguration *> TestTreeModel::getAllTestCases() const
foundProFiles.insert(proFile, foundProFiles[proFile] + child->childCount());
}
// create TestConfiguration for each project file
foreach (const QString &proFile, foundProFiles.keys()) {
TestConfiguration *tc = new TestConfiguration(QString(), QStringList(),
foundProFiles.value(proFile));
tc->setProFile(proFile);
{
QHash<QString, int>::ConstIterator it = foundProFiles.begin();
QHash<QString, int>::ConstIterator end = foundProFiles.end();
for ( ; it != end; ++it) {
TestConfiguration *tc = new TestConfiguration(QString(), QStringList(), it.value());
tc->setProFile(it.key());
tc->setProject(project);
result << tc;
}
}
foundProFiles.clear();
@@ -298,8 +301,9 @@ QList<TestConfiguration *> TestTreeModel::getAllTestCases() const
}
}
QHash<ProFileWithDisplayName, int>::Iterator it = proFilesWithTestSets.begin();
QHash<ProFileWithDisplayName, int>::Iterator end = proFilesWithTestSets.end();
{
QHash<ProFileWithDisplayName, int>::ConstIterator it = proFilesWithTestSets.begin();
QHash<ProFileWithDisplayName, int>::ConstIterator end = proFilesWithTestSets.end();
for ( ; it != end; ++it) {
const ProFileWithDisplayName &key = it.key();
TestConfiguration *tc = new TestConfiguration(QString(), QStringList(), it.value());
@@ -309,6 +313,7 @@ QList<TestConfiguration *> TestTreeModel::getAllTestCases() const
tc->setProject(project);
result << tc;
}
}
return result;
}
@@ -371,7 +376,7 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
// on and on and on...
// TODO: do this later on for Auto Tests as well to support strange setups? or redo the model
QMap<QString, TestConfiguration *> foundProFiles;
QHash<QString, TestConfiguration *> foundProFiles;
if (TestTreeItem *unnamed = unnamedQuickTests()) {
for (int childRow = 0, ccount = unnamed->childCount(); childRow < ccount; ++ childRow) {
@@ -437,12 +442,17 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
}
}
foreach (TestConfiguration *config, foundProFiles.values()) {
{
QHash<QString, TestConfiguration *>::ConstIterator it = foundProFiles.begin();
QHash<QString, TestConfiguration *>::ConstIterator end = foundProFiles.end();
for ( ; it != end; ++it) {
TestConfiguration *config = it.value();
if (!config->unnamedOnly())
result << config;
else
delete config;
}
}
// get selected Google Tests
QHash<ProFileWithDisplayName, QStringList> proFilesWithCheckedTestSets;
@@ -465,8 +475,9 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
}
}
QHash<ProFileWithDisplayName, QStringList>::Iterator it = proFilesWithCheckedTestSets.begin();
QHash<ProFileWithDisplayName, QStringList>::Iterator end = proFilesWithCheckedTestSets.end();
{
QHash<ProFileWithDisplayName, QStringList>::ConstIterator it = proFilesWithCheckedTestSets.begin();
QHash<ProFileWithDisplayName, QStringList>::ConstIterator end = proFilesWithCheckedTestSets.end();
for ( ; it != end; ++it) {
const ProFileWithDisplayName &key = it.key();
TestConfiguration *tc = new TestConfiguration(QString(), it.value());
@@ -476,6 +487,7 @@ QList<TestConfiguration *> TestTreeModel::getSelectedTests() const
tc->setProject(project);
result << tc;
}
}
return result;
}
@@ -649,9 +661,9 @@ void TestTreeModel::sweep()
#endif
}
QMap<QString, QString> TestTreeModel::testCaseNamesForFiles(QStringList files)
QHash<QString, QString> TestTreeModel::testCaseNamesForFiles(QStringList files)
{
QMap<QString, QString> result;
QHash<QString, QString> result;
if (!m_autoTestRootItem)
return result;
@@ -691,6 +703,7 @@ bool TestTreeModel::sweepChildren(TestTreeItem *item)
continue;
}
}
hasChanged |= child->newlyAdded();
child->markForRemoval(false);
}
return hasChanged;

View File

@@ -81,7 +81,7 @@ public:
void markAllForRemoval();
void markForRemoval(const QString &filePath);
void sweep();
QMap<QString, QString> testCaseNamesForFiles(QStringList files);
QHash<QString, QString> testCaseNamesForFiles(QStringList files);
signals:
void testTreeModelChanged();

View File

@@ -76,8 +76,7 @@ void TestTreeView::changeCheckStateAll(const Qt::CheckState checkState)
{
const TestTreeModel *model = TestTreeModel::instance();
// 3 == Auto Tests, Quick Tests and Google Tests - must be raised if there will be others
for (int rootRow = 0; rootRow < 3; ++rootRow) {
for (int rootRow = 0; rootRow < model->rowCount(rootIndex()); ++rootRow) {
QModelIndex currentRootIndex = model->index(rootRow, 0, rootIndex());
if (!currentRootIndex.isValid())
return;

View File

@@ -139,7 +139,7 @@ const Utils::FileName BuildDirManager::sourceDirectory() const
return m_buildConfiguration->target()->project()->projectDirectory();
}
const CMakeConfig BuildDirManager::cmakeConfiguration() const
const CMakeConfig BuildDirManager::intendedConfiguration() const
{
return m_buildConfiguration->cmakeConfiguration();
}
@@ -161,7 +161,7 @@ void BuildDirManager::forceReparse()
QTC_ASSERT(tool, return);
QTC_ASSERT(!generator.isEmpty(), return);
startCMake(tool, generator, cmakeConfiguration());
startCMake(tool, generator, intendedConfiguration());
}
void BuildDirManager::resetData()
@@ -208,7 +208,7 @@ void BuildDirManager::parse()
if (!cbpFileFi.exists()) {
// Initial create:
startCMake(tool, generator, cmakeConfiguration());
startCMake(tool, generator, intendedConfiguration());
return;
}
@@ -265,7 +265,7 @@ void BuildDirManager::clearFiles()
m_files.clear();
}
CMakeConfig BuildDirManager::configuration() const
CMakeConfig BuildDirManager::parsedConfiguration() const
{
if (!m_hasData)
return CMakeConfig();
@@ -273,9 +273,11 @@ CMakeConfig BuildDirManager::configuration() const
Utils::FileName cacheFile = workDirectory();
cacheFile.appendPath(QLatin1String("CMakeCache.txt"));
QString errorMessage;
CMakeConfig result = parseConfiguration(cacheFile, sourceDirectory(), &errorMessage);
CMakeConfig result = parseConfiguration(cacheFile, &errorMessage);
if (!errorMessage.isEmpty())
emit errorOccured(errorMessage);
if (CMakeConfigItem::valueOf("CMAKE_HOME_DIRECTORY", result) != sourceDirectory().toString().toUtf8())
emit errorOccured(tr("The build directory is not for %1").arg(sourceDirectory().toUserOutput()));
return result;
}
@@ -295,6 +297,8 @@ void BuildDirManager::stopProcess()
cleanUpProcess();
if (!m_future)
return;
m_future->reportCanceled();
m_future->reportFinished();
delete m_future;
@@ -540,7 +544,6 @@ static CMakeConfigItem::Type fromByteArray(const QByteArray &type) {
}
CMakeConfig BuildDirManager::parseConfiguration(const Utils::FileName &cacheFile,
const Utils::FileName &sourceDir,
QString *errorMessage)
{
CMakeConfig result;
@@ -577,19 +580,7 @@ CMakeConfig BuildDirManager::parseConfiguration(const Utils::FileName &cacheFile
advancedSet.insert(key.left(key.count() - 9 /* "-ADVANCED" */));
} else {
CMakeConfigItem::Type t = fromByteArray(type);
if (t != CMakeConfigItem::INTERNAL)
result << CMakeConfigItem(key, t, documentation, value);
// Sanity checks:
if (key == "CMAKE_HOME_DIRECTORY") {
const Utils::FileName actualSourceDir = Utils::FileName::fromUserInput(QString::fromUtf8(value));
if (actualSourceDir != sourceDir) {
if (errorMessage)
*errorMessage = tr("Build directory contains a build of the wrong project (%1).")
.arg(actualSourceDir.toUserOutput());
return CMakeConfig();
}
}
}
}
@@ -604,5 +595,58 @@ CMakeConfig BuildDirManager::parseConfiguration(const Utils::FileName &cacheFile
return result;
}
void BuildDirManager::maybeForceReparse()
{
const QByteArray GENERATOR_KEY = "CMAKE_GENERATOR";
const QByteArray EXTRA_GENERATOR_KEY = "CMAKE_EXTRA_GENERATOR";
const QByteArray CMAKE_COMMAND_KEY = "CMAKE_COMMAND";
if (!m_hasData)
return;
const CMakeConfig currentConfig = parsedConfiguration();
const QString kitGenerator = CMakeGeneratorKitInformation::generator(kit());
int pos = kitGenerator.lastIndexOf(QLatin1String(" - "));
const QString extraKitGenerator = (pos > 0) ? kitGenerator.left(pos) : QString();
const QString mainKitGenerator = (pos > 0) ? kitGenerator.mid(pos + 3) : kitGenerator;
CMakeConfig targetConfig = m_buildConfiguration->cmakeConfiguration();
targetConfig.append(CMakeConfigItem(GENERATOR_KEY, CMakeConfigItem::INTERNAL,
QByteArray(), mainKitGenerator.toUtf8()));
if (!extraKitGenerator.isEmpty())
targetConfig.append(CMakeConfigItem(EXTRA_GENERATOR_KEY, CMakeConfigItem::INTERNAL,
QByteArray(), extraKitGenerator.toUtf8()));
const CMakeTool *tool = CMakeKitInformation::cmakeTool(kit());
if (tool)
targetConfig.append(CMakeConfigItem(CMAKE_COMMAND_KEY, CMakeConfigItem::INTERNAL,
QByteArray(), tool->cmakeExecutable().toUserOutput().toUtf8()));
Utils::sort(targetConfig, CMakeConfigItem::sortOperator());
auto ccit = currentConfig.constBegin();
auto kcit = targetConfig.constBegin();
while (ccit != currentConfig.constEnd() && kcit != targetConfig.constEnd()) {
if (ccit->key == kcit->key) {
if (ccit->value != kcit->value)
break;
++ccit;
++kcit;
} else {
if (ccit->key < kcit->key)
++ccit;
else
break;
}
}
if (kcit != targetConfig.end()) {
if (kcit->key == GENERATOR_KEY
|| kcit->key == EXTRA_GENERATOR_KEY
|| kcit->key == CMAKE_COMMAND_KEY)
clearCache();
else
forceReparse();
}
}
} // namespace Internal
} // namespace CMakeProjectManager

View File

@@ -23,8 +23,7 @@
**
****************************************************************************/
#ifndef CMAKE_BUILDDIRMANAGER_H
#define CMAKE_BUILDDIRMANAGER_H
#pragma once
#include "cmakecbpparser.h"
#include "cmakeconfigitem.h"
@@ -71,12 +70,13 @@ public:
const Utils::FileName buildDirectory() const;
const Utils::FileName workDirectory() const;
const Utils::FileName sourceDirectory() const;
const CMakeConfig cmakeConfiguration() const;
const CMakeConfig intendedConfiguration() const;
bool isParsing() const;
void parse();
void clearCache();
void forceReparse();
void maybeForceReparse(); // Only reparse if the configuration has changed...
void resetData();
bool persistCMakeState();
@@ -85,10 +85,9 @@ public:
QList<CMakeBuildTarget> buildTargets() const;
QList<ProjectExplorer::FileNode *> files();
void clearFiles();
CMakeConfig configuration() const;
CMakeConfig parsedConfiguration() const;
static CMakeConfig parseConfiguration(const Utils::FileName &cacheFile,
const Utils::FileName &sourceDir,
QString *errorMessage);
signals:
@@ -129,5 +128,3 @@ private:
} // namespace Internal
} // namespace CMakeProjectManager
#endif // CMAKE_BUILDDIRMANAGER_H

View File

@@ -80,7 +80,13 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(ProjectExplorer::Target *parent
m_buildDirManager, &BuildDirManager::forceReparse);
connect(this, &CMakeBuildConfiguration::buildDirectoryChanged,
m_buildDirManager, &BuildDirManager::forceReparse);
connect(target(), &Target::kitChanged, m_buildDirManager, &BuildDirManager::forceReparse);
connect(target(), &Target::kitChanged, this, [this]() {
ProjectExplorer::Kit *k = target()->kit();
CMakeConfig config = cmakeConfiguration();
config.append(CMakeConfigurationKitInformation::configuration(k)); // last value wins...
setCMakeConfiguration(config);
m_buildDirManager->maybeForceReparse();
});
connect(this, &CMakeBuildConfiguration::parsingStarted, project, &CMakeProject::handleParsingStarted);
connect(this, &CMakeBuildConfiguration::dataAvailable, project, &CMakeProject::parseCMakeOutput);
@@ -195,9 +201,11 @@ QList<ConfigModel::DataItem> CMakeBuildConfiguration::completeCMakeConfiguration
return QList<ConfigModel::DataItem>();
if (m_completeConfigurationCache.isEmpty())
m_completeConfigurationCache = m_buildDirManager->configuration();
m_completeConfigurationCache = m_buildDirManager->parsedConfiguration();
return Utils::transform(m_completeConfigurationCache, [](const CMakeConfigItem &i) {
CMakeConfig cache = Utils::filtered(m_completeConfigurationCache,
[](const CMakeConfigItem &i) { return i.type != CMakeConfigItem::INTERNAL; });
return Utils::transform(cache, [](const CMakeConfigItem &i) {
ConfigModel::DataItem j;
j.key = QString::fromUtf8(i.key);
j.value = QString::fromUtf8(i.value);

View File

@@ -97,7 +97,6 @@ private:
void setError(const QString &message);
QString m_initialArguments;
CMakeConfig m_configuration;
QString m_error;

View File

@@ -270,6 +270,7 @@ void CMakeBuildStep::stdOutput(const QString &line)
int percent = m_percentProgress.cap(1).toInt(&ok);
if (ok)
futureInterface()->setProgressValue(percent);
return;
} else if (m_ninjaProgress.indexIn(line) != -1) {
m_useNinja = true;
bool ok = false;
@@ -281,6 +282,7 @@ void CMakeBuildStep::stdOutput(const QString &line)
futureInterface()->setProgressValue(percent);
}
}
return;
}
if (m_useNinja)
AbstractProcessStep::stdError(line);
@@ -359,7 +361,7 @@ QString CMakeBuildStep::allArguments(const CMakeRunConfiguration *rc) const
if (!m_toolArguments.isEmpty()) {
Utils::QtcProcess::addArg(&arguments, QLatin1String("--"));
Utils::QtcProcess::addArg(&arguments, m_toolArguments);
arguments += QLatin1Char(' ') + m_toolArguments;
}
return arguments;

View File

@@ -42,7 +42,7 @@ CMakeConfigItem::CMakeConfigItem(const CMakeConfigItem &other) :
value(other.value), documentation(other.documentation)
{ }
CMakeConfigItem::CMakeConfigItem(const QByteArray &k, CMakeConfigItem::Type &t,
CMakeConfigItem::CMakeConfigItem(const QByteArray &k, Type t,
const QByteArray &d, const QByteArray &v) :
key(k), type(t), value(v), documentation(d)
{ }
@@ -51,6 +51,15 @@ CMakeConfigItem::CMakeConfigItem(const QByteArray &k, const QByteArray &v) :
key(k), value(v)
{ }
QByteArray CMakeConfigItem::valueOf(const QByteArray &key, const QList<CMakeConfigItem> &input)
{
for (auto it = input.constBegin(); it != input.constEnd(); ++it) {
if (it->key == key)
return it->value;
}
return QByteArray();
}
std::function<bool (const CMakeConfigItem &a, const CMakeConfigItem &b)> CMakeConfigItem::sortOperator()
{
return [](const CMakeConfigItem &a, const CMakeConfigItem &b) { return a.key < b.key; };

View File

@@ -37,9 +37,11 @@ public:
enum Type { FILEPATH, PATH, BOOL, STRING, INTERNAL };
CMakeConfigItem();
CMakeConfigItem(const CMakeConfigItem &other);
CMakeConfigItem(const QByteArray &k, Type &t, const QByteArray &d, const QByteArray &v);
CMakeConfigItem(const QByteArray &k, Type t, const QByteArray &d, const QByteArray &v);
CMakeConfigItem(const QByteArray &k, const QByteArray &v);
static QByteArray valueOf(const QByteArray &key, const QList<CMakeConfigItem> &input);
bool isNull() const { return key.isEmpty(); }
static std::function<bool(const CMakeConfigItem &a, const CMakeConfigItem &b)> sortOperator();

View File

@@ -56,6 +56,7 @@ class DesignModePrivate
{
public:
DesignModePrivate();
~DesignModePrivate();
public:
QPointer<IEditor> m_currentEditor;
@@ -72,6 +73,11 @@ DesignModePrivate::DesignModePrivate()
m_stackWidget(new QStackedWidget)
{}
DesignModePrivate::~DesignModePrivate()
{
delete m_stackWidget;
}
DesignMode::DesignMode()
: d(new DesignModePrivate)
{

View File

@@ -83,14 +83,8 @@ public:
bool findPageById(const Id id, int *pageIndex) const
{
for (int j = 0; j < pages.size(); ++j) {
IOptionsPage *page = pages.at(j);
if (page->id() == id) {
*pageIndex = j;
return true;
}
}
return false;
*pageIndex = Utils::indexOf(pages, Utils::equal(&IOptionsPage::id, id));
return *pageIndex != -1;
}
Id id;
@@ -460,7 +454,6 @@ void SettingsDialog::showPage(const Id pageId)
for (int i = 0; i < categories.size(); ++i) {
Category *category = categories.at(i);
if (category->providers.isEmpty()) { // no providers
ensureCategoryWidget(category);
if (category->findPageById(initialPageId, &initialPageIndex)) {
initialCategoryIndex = i;
break;

View File

@@ -23,8 +23,7 @@
**
****************************************************************************/
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#pragma once
#include "coreplugin/dialogs/ioptionspage.h"
@@ -104,5 +103,3 @@ private:
} // namespace Internal
} // namespace Core
#endif // SETTINGSDIALOG_H

View File

@@ -67,15 +67,8 @@ FindToolBar::FindToolBar(CurrentDocumentFind *currentDocumentFind)
: m_currentDocumentFind(currentDocumentFind),
m_findCompleter(new QCompleter(this)),
m_replaceCompleter(new QCompleter(this)),
m_enterFindStringAction(0),
m_findNextAction(0),
m_findPreviousAction(0),
m_replaceAction(0),
m_replaceNextAction(0),
m_replacePreviousAction(0),
m_findIncrementalTimer(this), m_findStepTimer(this),
m_useFakeVim(false),
m_eventFiltersInstalled(false)
m_findIncrementalTimer(this),
m_findStepTimer(this)
{
//setup ui
m_ui.setupUi(this);
@@ -392,7 +385,7 @@ void FindToolBar::updateGlobalActions()
m_findInDocumentAction->setEnabled(enabled || (toolBarHasFocus() && isEnabled()));
m_findNextSelectedAction->setEnabled(enabled);
m_findPreviousSelectedAction->setEnabled(enabled);
if (QApplication::clipboard()->supportsFindBuffer())
if (m_enterFindStringAction)
m_enterFindStringAction->setEnabled(enabled);
m_findNextAction->setEnabled(enabled);
m_findPreviousAction->setEnabled(enabled);

View File

@@ -155,40 +155,40 @@ private:
void updateIcons();
void updateFlagMenus();
CurrentDocumentFind *m_currentDocumentFind;
CurrentDocumentFind *m_currentDocumentFind = nullptr;
Ui::FindWidget m_ui;
QCompleter *m_findCompleter;
QCompleter *m_replaceCompleter;
QAction *m_goToCurrentFindAction;
QAction *m_findInDocumentAction;
QAction *m_findNextSelectedAction;
QAction *m_findPreviousSelectedAction;
QAction *m_enterFindStringAction;
QAction *m_findNextAction;
QAction *m_findPreviousAction;
QAction *m_replaceAction;
QAction *m_replaceNextAction;
QAction *m_replacePreviousAction;
QAction *m_replaceAllAction;
QAction *m_caseSensitiveAction;
QAction *m_wholeWordAction;
QAction *m_regularExpressionAction;
QAction *m_preserveCaseAction;
QCompleter *m_findCompleter = nullptr;
QCompleter *m_replaceCompleter = nullptr;
QAction *m_goToCurrentFindAction = nullptr;
QAction *m_findInDocumentAction = nullptr;
QAction *m_findNextSelectedAction = nullptr;
QAction *m_findPreviousSelectedAction = nullptr;
QAction *m_enterFindStringAction = nullptr;
QAction *m_findNextAction = nullptr;
QAction *m_findPreviousAction = nullptr;
QAction *m_replaceAction = nullptr;
QAction *m_replaceNextAction = nullptr;
QAction *m_replacePreviousAction = nullptr;
QAction *m_replaceAllAction = nullptr;
QAction *m_caseSensitiveAction = nullptr;
QAction *m_wholeWordAction = nullptr;
QAction *m_regularExpressionAction = nullptr;
QAction *m_preserveCaseAction = nullptr;
QAction *m_localFindNextAction;
QAction *m_localFindPreviousAction;
QAction *m_localReplaceAction;
QAction *m_localReplaceNextAction;
QAction *m_localReplacePreviousAction;
QAction *m_localReplaceAllAction;
QAction *m_localFindNextAction = nullptr;
QAction *m_localFindPreviousAction = nullptr;
QAction *m_localReplaceAction = nullptr;
QAction *m_localReplaceNextAction = nullptr;
QAction *m_localReplacePreviousAction = nullptr;
QAction *m_localReplaceAllAction = nullptr;
FindFlags m_findFlags;
QTimer m_findIncrementalTimer;
QTimer m_findStepTimer;
IFindSupport::Result m_lastResult;
bool m_useFakeVim;
bool m_eventFiltersInstalled;
IFindSupport::Result m_lastResult = IFindSupport::NotYetFound;
bool m_useFakeVim = false;
bool m_eventFiltersInstalled = false;
};
} // namespace Internal

View File

@@ -123,23 +123,12 @@ public:
void init();
public:
const QImage lineeditImage;
const QImage lineeditImage_disabled;
const QPixmap extButtonPixmap;
const QPixmap closeButtonPixmap;
StyleAnimator animator;
};
QString lineEditImageFileName(const QString &pngFileName)
{
return Utils::creatorTheme()->widgetStyle() == Utils::Theme::StyleDefault
? StyleHelper::dpiSpecificImageFile(pngFileName)
: QString();
}
ManhattanStylePrivate::ManhattanStylePrivate() :
lineeditImage(lineEditImageFileName(QLatin1String(":/core/images/inputfield.png"))),
lineeditImage_disabled(lineEditImageFileName(QLatin1String(":/core/images/inputfield_disabled.png"))),
extButtonPixmap(Core::Icons::TOOLBAR_EXTENSION.pixmap()),
closeButtonPixmap(Core::Icons::CLOSE_FOREGROUND.pixmap())
{
@@ -464,8 +453,13 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
painter->setBrushOrigin(backgroundRect.topLeft());
painter->fillRect(backgroundRect, option->palette.base());
static const QImage bg(StyleHelper::dpiSpecificImageFile(
QLatin1String(":/core/images/inputfield.png")));
static const QImage bg_disabled(StyleHelper::dpiSpecificImageFile(
QLatin1String(":/core/images/inputfield_disabled.png")));
const bool enabled = option->state & State_Enabled;
StyleHelper::drawCornerImage(enabled ? d->lineeditImage : d->lineeditImage_disabled,
StyleHelper::drawCornerImage(enabled ? bg : bg_disabled,
painter, option->rect, 5, 5, 5, 5);
} else {
painter->fillRect(backgroundRect, option->palette.base());
@@ -657,7 +651,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
const bool act = mbi->state & (State_Sunken | State_Selected);
const bool dis = !(mbi->state & State_Enabled);
if (creatorTheme()->widgetStyle() == Theme::StyleFlat)
if (creatorTheme()->flag(Theme::FlatMenuBar))
painter->fillRect(option->rect, StyleHelper::isBaseColorDefault()
? creatorTheme()->color(Theme::MenuBarItemBackgroundColor)
: StyleHelper::baseColor());
@@ -790,7 +784,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
break;
case CE_MenuBarEmptyArea: {
if (creatorTheme()->widgetStyle() == Theme::StyleDefault) {
if (!creatorTheme()->flag(Theme::FlatMenuBar)) {
StyleHelper::menuGradient(painter, option->rect, option->rect);
painter->save();
painter->setPen(StyleHelper::borderColor());
@@ -830,6 +824,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
else
StyleHelper::verticalGradient(painter, gradientSpan, rect, drawLightColored);
if (creatorTheme()->flag(Theme::DrawToolBarHighlights)) {
if (!drawLightColored)
painter->setPen(StyleHelper::borderColor());
else
@@ -858,6 +853,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
painter->drawLine(borderRect.topRight(), borderRect.bottomRight());
}
}
}
break;
default:

View File

@@ -182,11 +182,11 @@ void ProgressBar::setError(bool on)
QSize ProgressBar::sizeHint() const
{
int width = 50;
int height = PROGRESSBAR_HEIGHT + 6;
int height = PROGRESSBAR_HEIGHT + 5;
if (m_titleVisible) {
QFontMetrics fm(titleFont());
width = qMax(width, fm.width(m_title) + 16);
height += fm.height() + 4;
height += fm.height() + 5;
}
if (m_separatorVisible)
height += SEPARATOR_HEIGHT;
@@ -226,12 +226,9 @@ void ProgressBar::paintEvent(QPaintEvent *)
// TODO move font into Utils::StyleHelper
// TODO use Utils::StyleHelper white
if (bar.isNull())
bar.load(StyleHelper::dpiSpecificImageFile(QLatin1String(":/core/images/progressbar.png")));
double range = maximum() - minimum();
double percent = 0.;
if (range != 0)
if (!qFuzzyIsNull(range))
percent = (value() - minimum()) / range;
if (percent > 1)
percent = 1;
@@ -282,18 +279,13 @@ void ProgressBar::paintEvent(QPaintEvent *)
m_progressHeight = PROGRESSBAR_HEIGHT;
m_progressHeight += ((m_progressHeight % 2) + 1) % 2; // make odd
// draw outer rect
const QRect rect(INDENT - 1, titleHeight + separatorHeight + (m_titleVisible ? 4 : 3),
const QRect rect(INDENT - 1, titleHeight + separatorHeight + (m_titleVisible ? 5 : 4),
size().width() - 2 * INDENT + 1, m_progressHeight);
if (creatorTheme()->flag(Theme::DrawProgressBarSunken))
StyleHelper::drawCornerImage(bar, &p, rect, 3, 3, 3, 3);
// draw inner rect
QColor c = creatorTheme()->color(Theme::ProgressBarColorNormal);
p.setPen(Qt::NoPen);
QRectF inner = rect.adjusted(2, 2, -2, -2);
inner.adjust(0, 0, qRound((percent - 1) * inner.width()), 0);
QColor c;
if (m_error) {
c = creatorTheme()->color(Theme::ProgressBarColorError);
// avoid too small red bar
@@ -301,25 +293,33 @@ void ProgressBar::paintEvent(QPaintEvent *)
inner.adjust(0, 0, 10 - inner.width(), 0);
} else if (m_finished) {
c = creatorTheme()->color(Theme::ProgressBarColorFinished);
} else {
c = creatorTheme()->color(Theme::ProgressBarColorNormal);
}
//draw the progress bar
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
p.fillRect(rect.adjusted(2, 2, -2, -2),
creatorTheme()->color(Theme::FancyToolButtonHoverColor));
p.fillRect(inner, c);
} else {
const static QImage bar(StyleHelper::dpiSpecificImageFile(
QLatin1String(":/core/images/progressbar.png")));
StyleHelper::drawCornerImage(bar, &p, rect, 3, 3, 3, 3);
// Draw line and shadow after the gradient fill
if (value() > 0 && value() < maximum()) {
p.fillRect(QRect(inner.right(), inner.top(), 2, inner.height()), QColor(0, 0, 0, 20));
p.fillRect(QRect(inner.right(), inner.top(), 1, inner.height()), QColor(0, 0, 0, 60));
}
p.setPen(Qt::NoPen);
if (creatorTheme()->widgetStyle() == Theme::StyleFlat) {
//draw the progress bar
p.setBrush (c);
} else {
QLinearGradient grad(inner.topLeft(), inner.bottomLeft());
grad.setColorAt(0, c.lighter(130));
grad.setColorAt(0.4, c.lighter(106));
grad.setColorAt(0.41, c.darker(106));
grad.setColorAt(1, c.darker(130));
p.setPen(Qt::NoPen);
p.setBrush(grad);
}
p.drawRect(inner);
p.setBrush(Qt::NoBrush);
p.setPen(QPen(QColor(0, 0, 0, 30), 1));
@@ -328,6 +328,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
p.drawLine(inner.topLeft() + QPointF(0.5, 0.5), inner.bottomLeft() + QPointF(0.5, -0.5));
p.drawLine(inner.topRight() + QPointF(-0.5, 0.5), inner.bottomRight() + QPointF(-0.5, -0.5));
p.drawLine(inner.bottomLeft() + QPointF(0.5, -0.5), inner.bottomRight() + QPointF(-0.5, -0.5));
}
if (m_cancelEnabled) {
// Draw cancel button
@@ -337,8 +338,9 @@ void ProgressBar::paintEvent(QPaintEvent *)
m_cancelRect = QRect(rect.adjusted(rect.width() - CANCELBUTTON_WIDTH + 2, 1, 0, 0));
const bool hover = m_cancelRect.contains(mapFromGlobal(QCursor::pos()));
const QRectF cancelVisualRect(m_cancelRect.adjusted(0, 1, -2, -2));
QLinearGradient grad(cancelVisualRect.topLeft(), cancelVisualRect.bottomLeft());
int intensity = hover ? 90 : 70;
if (creatorTheme()->widgetStyle() != Theme::StyleFlat) {
QLinearGradient grad(cancelVisualRect.topLeft(), cancelVisualRect.bottomLeft());
QColor buttonColor(intensity, intensity, intensity, 255);
grad.setColorAt(0, buttonColor.lighter(130));
grad.setColorAt(1, buttonColor.darker(130));
@@ -352,6 +354,7 @@ void ProgressBar::paintEvent(QPaintEvent *)
p.drawLine(cancelVisualRect.topLeft() + QPointF(0.5, 0.5), cancelVisualRect.bottomLeft() + QPointF(0.5, -0.5));
p.setPen(QPen(QColor(255, 255, 255, 30)));
p.drawLine(cancelVisualRect.topLeft() + QPointF(1.5, 0.5), cancelVisualRect.bottomLeft() + QPointF(1.5, -0.5));
}
p.setPen(QPen(hover ? StyleHelper::panelTextColor() : QColor(180, 180, 180), 1.2, Qt::SolidLine, Qt::FlatCap));
p.setRenderHint(QPainter::Antialiasing, true);
p.drawLine(cancelVisualRect.topLeft() + QPointF(4.0, 2.0), cancelVisualRect.bottomRight() + QPointF(-3.0, -2.0));

View File

@@ -76,7 +76,6 @@ protected:
private:
QFont titleFont() const;
QImage bar;
QString m_text;
QString m_title;
bool m_titleVisible;

View File

@@ -313,7 +313,7 @@ void ProgressManagerPrivate::init()
m_summaryProgressWidget->setVisible(!m_progressViewPinned);
m_summaryProgressWidget->setGraphicsEffect(m_opacityEffect);
m_summaryProgressLayout = new QHBoxLayout(m_summaryProgressWidget);
m_summaryProgressLayout->setContentsMargins(0, 0, 0, 0);
m_summaryProgressLayout->setContentsMargins(0, 0, 0, 2);
m_summaryProgressLayout->setSpacing(0);
m_summaryProgressWidget->setLayout(m_summaryProgressLayout);
m_summaryProgressBar = new ProgressBar(m_summaryProgressWidget);

View File

@@ -39,7 +39,7 @@ enum { debug = 0 };
static const char PASTEBIN_BASE[]="http://pastebin.com/";
static const char PASTEBIN_API[]="api/api_post.php";
static const char PASTEBIN_RAW[]="raw.php";
static const char PASTEBIN_RAW[]="raw/";
static const char PASTEBIN_ARCHIVE[]="archive";
static const char API_KEY[]="api_dev_key=516686fc461fb7f9341fd7cf2af6f829&"; // user: qtcreator_apikey
@@ -142,7 +142,6 @@ void PasteBinDotComProtocol::fetch(const QString &id)
{
// Did we get a complete URL or just an id. Insert a call to the php-script
QString link = QLatin1String(PASTEBIN_BASE) + QLatin1String(PASTEBIN_RAW);
link.append(QLatin1String("?i="));
if (id.startsWith(QLatin1String("http://")))
link.append(id.mid(id.lastIndexOf(QLatin1Char('/')) + 1));
@@ -168,18 +167,7 @@ void PasteBinDotComProtocol::fetchFinished()
qDebug() << "fetchFinished: error" << m_fetchId << content;
} else {
title = QLatin1String(PROTOCOL_NAME) + QLatin1String(": ") + m_fetchId;
content = QString::fromLatin1(m_fetchReply->readAll());
// Cut out from '<pre>' formatting
const int preEnd = content.lastIndexOf(QLatin1String("</pre>"));
if (preEnd != -1)
content.truncate(preEnd);
const int preStart = content.indexOf(QLatin1String("<pre>"));
if (preStart != -1)
content.remove(0, preStart + 5);
// Make applicable as patch.
content = Protocol::textFromHtml(content);
content += QLatin1Char('\n');
// -------------
content = QString::fromUtf8(m_fetchReply->readAll());
if (debug) {
QDebug nsp = qDebug().nospace();
nsp << "fetchFinished: " << content.size() << " Bytes";
@@ -203,9 +191,9 @@ void PasteBinDotComProtocol::list()
qDebug() << "list: sending " << url << m_listReply;
}
/* Quick & dirty: Parse out the 'archive' table as of 16.3.2011:
/* Quick & dirty: Parse out the 'archive' table as of 16.3.2016:
\code
<table class="maintable" cellspacing="0">
<table class="maintable">
<tr class="top">
<th scope="col" align="left">Name / Title</th>
<th scope="col" align="left">Posted</th>
@@ -307,7 +295,7 @@ static inline QStringList parseLists(QIODevice *io, QString *errorMessage)
// Read answer and delete part up to the main table since the input form has
// parts that can no longer be parsed using XML parsers (<input type="text" x-webkit-speech />)
QByteArray data = io->readAll();
const int tablePos = data.indexOf("<table class=\"maintable\" cellspacing=\"0\">");
const int tablePos = data.indexOf("<table class=\"maintable\">");
if (tablePos < 0) {
*errorMessage = QLatin1String("Could not locate beginning of table.");
return rc;

View File

@@ -42,14 +42,13 @@ PasteSelectDialog::PasteSelectDialog(const QList<Protocol*> &protocols,
m_ui.setupUi(this);
foreach (const Protocol *protocol, protocols) {
m_ui.protocolBox->addItem(protocol->name());
connect(protocol, SIGNAL(listDone(QString,QStringList)),
this, SLOT(listDone(QString,QStringList)));
connect(protocol, &Protocol::listDone, this, &PasteSelectDialog::listDone);
}
connect(m_ui.protocolBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(protocolChanged(int)));
connect(m_ui.protocolBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &PasteSelectDialog::protocolChanged);
m_refreshButton = m_ui.buttons->addButton(tr("Refresh"), QDialogButtonBox::ActionRole);
connect(m_refreshButton, SIGNAL(clicked()), this, SLOT(list()));
connect(m_refreshButton, &QPushButton::clicked, this, &PasteSelectDialog::list);
m_ui.listWidget->setSelectionMode(QAbstractItemView::SingleSelection);
if (!Utils::HostOsInfo::isMacHost())

View File

@@ -2,7 +2,6 @@
<qresource prefix="/cppeditor">
<file>images/qt_cpp.png</file>
<file>images/qt_h.png</file>
<file>CppEditor.mimetypes.xml</file>
<file>images/qt_c.png</file>
<file>images/dark_qt_cpp.png</file>
<file>images/dark_qt_h.png</file>

View File

@@ -47,11 +47,6 @@ const char OPEN_TYPE_HIERARCHY[] = "CppEditor.OpenTypeHierarchy";
const char INCLUDE_HIERARCHY_ID[] = "CppEditor.IncludeHierarchy";
const char OPEN_INCLUDE_HIERARCHY[] = "CppEditor.OpenIncludeHierarchy";
const char C_SOURCE_MIMETYPE[] = "text/x-csrc";
const char C_HEADER_MIMETYPE[] = "text/x-chdr";
const char CPP_SOURCE_MIMETYPE[] = "text/x-c++src";
const char CPP_HEADER_MIMETYPE[] = "text/x-c++hdr";
const char CPP_SNIPPETS_GROUP_ID[] = "C++";
const char CPP_PREPROCESSOR_PROJECT_PREFIX[] = "CppPreprocessorProject-";

View File

@@ -83,10 +83,11 @@ public:
{
setId(Constants::CPPEDITOR_ID);
setDisplayName(qApp->translate("OpenWith::Editors", Constants::CPPEDITOR_DISPLAY_NAME));
addMimeType(Constants::C_SOURCE_MIMETYPE);
addMimeType(Constants::C_HEADER_MIMETYPE);
addMimeType(Constants::CPP_SOURCE_MIMETYPE);
addMimeType(Constants::CPP_HEADER_MIMETYPE);
addMimeType(CppTools::Constants::C_SOURCE_MIMETYPE);
addMimeType(CppTools::Constants::C_HEADER_MIMETYPE);
addMimeType(CppTools::Constants::CPP_SOURCE_MIMETYPE);
addMimeType(CppTools::Constants::CPP_HEADER_MIMETYPE);
addMimeType(CppTools::Constants::QDOC_MIMETYPE);
setDocumentCreator([]() { return new CppEditorDocument; });
setEditorWidgetCreator([]() { return new CppEditorWidget; });
@@ -140,7 +141,6 @@ CppQuickFixAssistProvider *CppEditorPlugin::quickFixProvider() const
bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
{
Q_UNUSED(errorMessage)
Utils::MimeDatabase::addMimeTypes(QLatin1String(":/cppeditor/CppEditor.mimetypes.xml"));
addAutoReleasedObject(new CppEditorFactory);
addAutoReleasedObject(new CppOutlineWidgetFactory);
@@ -268,13 +268,13 @@ void CppEditorPlugin::extensionsInitialized()
if (!HostOsInfo::isMacHost() && !HostOsInfo::isWindowsHost()) {
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppSource, QLatin1String(":/cppeditor/images/qt_cpp.png"))),
Constants::CPP_SOURCE_MIMETYPE);
CppTools::Constants::CPP_SOURCE_MIMETYPE);
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCSource, QLatin1String(":/cppeditor/images/qt_c.png"))),
Constants::C_SOURCE_MIMETYPE);
CppTools::Constants::C_SOURCE_MIMETYPE);
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppHeader, QLatin1String(":/cppeditor/images/qt_h.png"))),
Constants::CPP_HEADER_MIMETYPE);
CppTools::Constants::CPP_HEADER_MIMETYPE);
}
}

View File

@@ -46,7 +46,6 @@
<mime-type type="text/x-c++src">
<comment>C++ source code</comment>
<sub-class-of type="text/x-csrc"/>
<comment>C++ source code</comment>
<glob pattern="*.cpp" weight="70"/>
<glob pattern="*.cxx" weight="70"/>
<glob pattern="*.cc" weight="70"/>
@@ -55,7 +54,6 @@
<!-- Additions to freedesktop: -->
<glob pattern="*.cp" weight="70"/>
<glob pattern="*.inl" weight="70"/>
<glob pattern="*.qdoc" weight="70"/>
<glob pattern="*.tcc" weight="70"/>
<glob pattern="*.tpp" weight="70"/>
<glob pattern="*.t++" weight="70"/>
@@ -65,10 +63,14 @@
</magic>
</mime-type>
<mime-type type="text/x-qdoc">
<comment>Qt documentation file</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.qdoc" weight="70"/>
</mime-type>
<mime-type type="text/x-moc">
<comment>Qt MOC file</comment>
<acronym>Qt MOC</acronym>
<expanded-acronym>Qt Meta Object Compiler</expanded-acronym>
<!-- Fix to freedesktop: moc is C++ source -->
<sub-class-of type="text/x-c++src"/>
<glob pattern="*.moc" weight="70"/>

View File

@@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/cpptools">
<file>images/category_cpp.png</file>
<file>CppTools.mimetypes.xml</file>
</qresource>
</RCC>

View File

@@ -42,6 +42,7 @@ const char CPP_SOURCE_MIMETYPE[] = "text/x-c++src";
const char OBJECTIVE_C_SOURCE_MIMETYPE[] = "text/x-objcsrc";
const char OBJECTIVE_CPP_SOURCE_MIMETYPE[] = "text/x-objc++src";
const char CPP_HEADER_MIMETYPE[] = "text/x-c++hdr";
const char QDOC_MIMETYPE[] = "text/x-qdoc";
// QSettings keys for use by the "New Class" wizards.
const char CPPTOOLS_SETTINGSGROUP[] = "CppTools";

View File

@@ -140,6 +140,8 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
Q_UNUSED(arguments)
Q_UNUSED(error)
Utils::MimeDatabase::addMimeTypes(QLatin1String(":/cpptools/CppTools.mimetypes.xml"));
CppModelManager::instance()->setParent(this);
m_settings = new CppToolsSettings(this); // force registration of cpp tools settings

View File

@@ -122,8 +122,9 @@ void GeneratedCodeModelSupport::update(const QList<ProjectExplorer::ExtraCompile
continue;
extraCompilerCache.insert(generator);
foreach (const Utils::FileName &generatedFile, generator->targets())
generator->forEachTarget([mm, generator](const Utils::FileName &generatedFile) {
new GeneratedCodeModelSupport(mm, generator, generatedFile);
});
}
}

View File

@@ -2008,9 +2008,9 @@ void CdbEngine::processStop(const GdbMi &stopReason, bool conditionalBreakPointT
// Fire off remaining commands asynchronously
if (!m_pendingBreakpointMap.isEmpty() && !m_pendingSubBreakpointMap.isEmpty())
listBreakpoints();
if (Internal::isDockVisible(QLatin1String(DOCKWIDGET_REGISTER)))
if (Internal::isRegistersWindowVisible())
reloadRegisters();
if (Internal::isDockVisible(QLatin1String(DOCKWIDGET_MODULES)))
if (Internal::isModulesWindowVisible())
reloadModules();
}
// After the sequence has been sent off and CDB is pondering the commands,

View File

@@ -77,7 +77,8 @@ void displayDebugger(DebuggerEngine *engine, bool updateEngine);
void synchronizeBreakpoints();
QWidget *mainWindow();
bool isDockVisible(const QString &objectName);
bool isRegistersWindowVisible();
bool isModulesWindowVisible();
void showModuleSymbols(const QString &moduleName, const QVector<Internal::Symbol> &symbols);
void showModuleSections(const QString &moduleName, const QVector<Internal::Section> &sections);
void openMemoryEditor();

View File

@@ -153,8 +153,8 @@ void DebuggerMainWindow::finalizeSetup(Core::IMode *mode, QWidget *central)
hbox->addWidget(m_perspectiveChooser);
hbox->addWidget(m_controlsStackWidget);
hbox->addWidget(m_statusLabel);
hbox->addWidget(new Utils::StyledSeparator);
hbox->addStretch();
hbox->addWidget(new Utils::StyledSeparator);
hbox->addWidget(viewButton);
connect(viewButton, &QAbstractButton::clicked, [this, viewButton] {

View File

@@ -687,24 +687,6 @@ public:
m_returnView->header()->resizeSection(section, newSize);
}
void sourceFilesDockToggled(bool on)
{
if (on && m_currentEngine->state() == InferiorStopOk)
m_currentEngine->reloadSourceFiles();
}
void modulesDockToggled(bool on)
{
if (on && m_currentEngine->state() == InferiorStopOk)
m_currentEngine->reloadModules();
}
void registerDockToggled(bool on)
{
if (on && m_currentEngine->state() == InferiorStopOk)
m_currentEngine->reloadRegisters();
}
void synchronizeBreakpoints()
{
showMessage(QLatin1String("ATTEMPT SYNC"), LogDebug);
@@ -1327,10 +1309,16 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_modulesView = new ModulesTreeView;
m_modulesView->setSettings(settings, "Debugger.ModulesView");
connect(m_modulesView, &BaseTreeView::aboutToShow, this, [this] {
m_currentEngine->reloadModules();
}, Qt::QueuedConnection);
m_modulesWindow = addSearch(m_modulesView, tr("Modules"), DOCKWIDGET_MODULES);
m_registerView = new RegisterTreeView;
m_registerView->setSettings(settings, "Debugger.RegisterView");
connect(m_registerView, &BaseTreeView::aboutToShow, this, [this] {
m_currentEngine->reloadRegisters();
}, Qt::QueuedConnection);
m_registerWindow = addSearch(m_registerView, tr("Registers"), DOCKWIDGET_REGISTER);
m_stackView = new StackTreeView;
@@ -1339,6 +1327,9 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
m_sourceFilesView = new SourceFilesTreeView;
m_sourceFilesView->setSettings(settings, "Debugger.SourceFilesView");
connect(m_sourceFilesView, &BaseTreeView::aboutToShow, this, [this] {
m_currentEngine->reloadSourceFiles();
}, Qt::QueuedConnection);
m_sourceFilesWindow = addSearch(m_sourceFilesView, tr("Source Files"), DOCKWIDGET_SOURCE_FILES);
m_threadsView = new ThreadsTreeView;
@@ -1527,10 +1518,10 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments,
cmd->setAttribute(Command::CA_UpdateText);
mstart->addAction(cmd, CC::G_DEFAULT_ONE);
m_visibleStartAction = new ProxyAction(this);
m_visibleStartAction->initialize(cmd->action());
m_visibleStartAction->initialize(m_startAction);
m_visibleStartAction->setAttribute(ProxyAction::UpdateText);
m_visibleStartAction->setAttribute(ProxyAction::UpdateIcon);
m_visibleStartAction->setAction(cmd->action());
m_visibleStartAction->setAction(m_startAction);
ModeManager::addAction(m_visibleStartAction, Constants::P_ACTION_DEBUG);
@@ -3128,10 +3119,14 @@ QWidget *mainWindow()
return dd->m_mainWindow;
}
bool isDockVisible(const QString &objectName)
bool isRegistersWindowVisible()
{
QDockWidget *dock = dd->findChild<QDockWidget *>(objectName);
return dock && dock->toggleViewAction()->isChecked();
return dd->m_registerWindow->isVisible();
}
bool isModulesWindowVisible()
{
return dd->m_modulesWindow->isVisible();
}
void openMemoryEditor()

View File

@@ -3445,7 +3445,7 @@ void GdbEngine::handleMakeSnapshot(const DebuggerResponse &response, const QStri
void GdbEngine::reloadRegisters()
{
if (!Internal::isDockVisible(_(DOCKWIDGET_REGISTER)))
if (!Internal::isRegistersWindowVisible())
return;
if (state() != InferiorStopOk && state() != InferiorUnrunnable)
@@ -3608,9 +3608,13 @@ void GdbEngine::handleRegisterListValues(const DebuggerResponse &response)
// v4_int32 = {0x00000000, 0x00000000, 0x00000000, 0x00000000},
// v2_int64 = {0x0000000000000000, 0x0000000000000000},
// uint128 = <error reading variable>}"}
// Try to make sense of it using the int32 chunks:
// Try to make sense of it using the int32 chunks.
// Android gdb 7.10 has u32 = {0x00000000, 0x40340000}.
// Use that if available.
QByteArray result;
const int pos1 = data.indexOf("_int32");
int pos1 = data.indexOf("_int32");
if (pos1 == -1)
pos1 = data.indexOf("u32");
const int pos2 = data.indexOf('{', pos1) + 1;
const int pos3 = data.indexOf('}', pos2);
QByteArray inner = data.mid(pos2, pos3 - pos2);

View File

@@ -956,7 +956,7 @@ void LldbEngine::handleLocationNotification(const GdbMi &reportedLocation)
void LldbEngine::reloadRegisters()
{
if (!Internal::isDockVisible(QLatin1String(DOCKWIDGET_REGISTER)))
if (!Internal::isRegistersWindowVisible())
return;
DebuggerCommand cmd("fetchRegisters");

View File

@@ -1121,8 +1121,8 @@ void QmlEngine::executeDebuggerCommand(const QString &command, DebuggerLanguages
} else if (d->unpausedEvaluate) {
d->evaluate(command, CB(d->handleExecuteDebuggerCommand));
} else {
d->engine->showMessage(_("The application has to be paused in order to evaluate "
"expressions").arg(command), ConsoleOutput);
d->engine->showMessage(_("The application has to be stopped in a breakpoint in order to "
"evaluate expressions").arg(command), ConsoleOutput);
}
}

View File

@@ -889,17 +889,8 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
} else if (act == &actRemoveAllWatchExpression) {
handler->clearWatches();
} else if (act == &actCopy) {
QString text;
QTextStream str(&text);
handler->model()->rootItem()->walkTree([&str](Utils::TreeItem *item) {
str << QString(item->level(), QLatin1Char('\t'))
<< item->data(0, Qt::DisplayRole).toString() << '\t'
<< item->data(1, Qt::DisplayRole).toString() << '\t'
<< item->data(2, Qt::DisplayRole).toString() << '\n';
});
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(text, QClipboard::Selection);
clipboard->setText(text, QClipboard::Clipboard);
QString contents = handler->editorContents();
copyToClipboard(contents);
} else if (act == &actCopyValue) {
copyToClipboard(mi1.data().toString());
} else if (act == &actShowInEditor) {

View File

@@ -29,7 +29,7 @@
#include <designer/qtdesignerformclasscodegenerator.h>
#include <qtsupport/qtsupportconstants.h>
#include <cppeditor/cppeditorconstants.h>
#include <cpptools/cpptoolsconstants.h>
#include <QDebug>
@@ -43,12 +43,12 @@ FormClassWizard::FormClassWizard()
QString FormClassWizard::headerSuffix() const
{
return preferredSuffix(QLatin1String(CppEditor::Constants::CPP_HEADER_MIMETYPE));
return preferredSuffix(QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE));
}
QString FormClassWizard::sourceSuffix() const
{
return preferredSuffix(QLatin1String(CppEditor::Constants::CPP_SOURCE_MIMETYPE));
return preferredSuffix(QLatin1String(CppTools::Constants::CPP_SOURCE_MIMETYPE));
}
QString FormClassWizard::formSuffix() const

View File

@@ -145,7 +145,7 @@ void ActionHandler::createActions()
menuTools->addMenu(menuModelEditor);
Core::Command *exportDiagramCommand = registerCommand(
Constants::EXPORT_DIAGRAM, [this]() { exportDiagram(); }, Core::Context(), true,
Constants::EXPORT_DIAGRAM, [this]() { exportDiagram(); }, d->context, true,
tr("Export Diagram..."));
menuModelEditor->addAction(exportDiagramCommand);
d->exportDiagramAction = exportDiagramCommand->action();

View File

@@ -596,6 +596,7 @@ void ModelEditor::updateSelectedArea(SelectedArea selectedArea)
bool canSelectAll = false;
bool canCopyDiagram = false;
bool canOpenParentDiagram = false;
bool canExportDiagram = false;
QList<qmt::MElement *> propertiesModelElements;
QList<qmt::DElement *> propertiesDiagramElements;
qmt::MDiagram *propertiesDiagram = 0;
@@ -604,10 +605,12 @@ void ModelEditor::updateSelectedArea(SelectedArea selectedArea)
switch (d->selectedArea) {
case SelectedArea::Nothing:
canSelectAll = activeDiagram && !activeDiagram->diagramElements().isEmpty();
canExportDiagram = activeDiagram != 0;
break;
case SelectedArea::Diagram:
{
if (activeDiagram) {
canExportDiagram = true;
bool hasSelection = documentController->diagramsManager()->diagramSceneModel(activeDiagram)->hasSelection();
canCutCopyDelete = hasSelection;
canRemove = hasSelection;
@@ -631,6 +634,7 @@ void ModelEditor::updateSelectedArea(SelectedArea selectedArea)
}
case SelectedArea::TreeView:
{
canExportDiagram = activeDiagram != 0;
bool hasSelection = !d->modelTreeViewServant->selectedObjects().isEmpty();
bool hasSingleSelection = d->modelTreeViewServant->selectedObjects().indices().size() == 1;
canCutCopyDelete = hasSelection && !d->modelTreeViewServant->isRootPackageSelected();
@@ -658,6 +662,7 @@ void ModelEditor::updateSelectedArea(SelectedArea selectedArea)
d->actionHandler->deleteAction()->setEnabled(canCutCopyDelete);
d->actionHandler->selectAllAction()->setEnabled(canSelectAll);
d->actionHandler->openParentDiagramAction()->setEnabled(canOpenParentDiagram);
d->actionHandler->exportDiagramAction()->setEnabled(canExportDiagram);
if (!propertiesModelElements.isEmpty())
showProperties(propertiesModelElements);

View File

@@ -350,6 +350,8 @@ Abi::Abi(const QString &abiString) :
m_architecture = UnknownArchitecture;
else if (abiParts.at(0) == QLatin1String("arm"))
m_architecture = ArmArchitecture;
else if (abiParts.at(0) == QLatin1String("aarch64"))
m_architecture = ArmArchitecture;
else if (abiParts.at(0) == QLatin1String("x86"))
m_architecture = X86Architecture;
else if (abiParts.at(0) == QLatin1String("mips"))
@@ -482,6 +484,9 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
} else if (p.startsWith(QLatin1String("arm"))) {
arch = Abi::ArmArchitecture;
width = p.contains(QLatin1String("64")) ? 64 : 32;
} else if (p.startsWith(QLatin1String("aarch64"))) {
arch = Abi::ArmArchitecture;
width = 64;
} else if (p.startsWith(QLatin1String("mips"))) {
arch = Abi::MipsArchitecture;
width = p.contains(QLatin1String("64")) ? 64 : 32;
@@ -1131,6 +1136,10 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet_data()
QTest::newRow("x86_64-unknown-openbsd") << int(Abi::X86Architecture)
<< int(Abi::BsdOS) << int(Abi::OpenBsdFlavor)
<< int(Abi::ElfFormat) << 64;
QTest::newRow("aarch64-unknown-linux-gnu") << int(Abi::ArmArchitecture)
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
<< int(Abi::ElfFormat) << 64;
}
void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet()

View File

@@ -58,8 +58,7 @@ class ExtraCompilerPrivate
public:
const Project *project;
Utils::FileName source;
QHash<Utils::FileName, QByteArray> contents;
Utils::FileNameList targets;
FileNameToContentsHash contents;
QList<Task> issues;
QDateTime compileTime;
Core::IEditor *lastEditor = nullptr;
@@ -77,7 +76,6 @@ ExtraCompiler::ExtraCompiler(const Project *project, const Utils::FileName &sour
{
d->project = project;
d->source = source;
d->targets = targets;
foreach (const Utils::FileName &target, targets)
d->contents.insert(target, QByteArray());
d->timer.setSingleShot(true);
@@ -156,7 +154,13 @@ QByteArray ExtraCompiler::content(const Utils::FileName &file) const
Utils::FileNameList ExtraCompiler::targets() const
{
return d->targets;
return d->contents.keys();
}
void ExtraCompiler::forEachTarget(std::function<void (const Utils::FileName &)> func)
{
for (auto it = d->contents.constBegin(), end = d->contents.constEnd(); it != end; ++it)
func(it.key());
}
void ExtraCompiler::setCompileTime(const QDateTime &time)
@@ -185,12 +189,12 @@ void ExtraCompiler::onTargetsBuilt(Project *project)
if (d->compileTime.isValid() && d->compileTime >= sourceTime)
return;
foreach (const Utils::FileName &target, d->targets) {
forEachTarget([&](const Utils::FileName &target) {
QFileInfo fi(target.toFileInfo());
QDateTime generateTime = fi.exists() ? fi.lastModified() : QDateTime();
if (generateTime.isValid() && (generateTime > sourceTime)) {
if (d->compileTime >= generateTime)
continue;
return;
QFile file(target.toString());
if (file.open(QFile::ReadOnly | QFile::Text)) {
@@ -198,7 +202,7 @@ void ExtraCompiler::onTargetsBuilt(Project *project)
setContent(target, file.readAll());
}
}
}
});
}
void ExtraCompiler::onEditorChanged(Core::IEditor *editor)
@@ -354,7 +358,11 @@ ExtraCompilerFactory::ExtraCompilerFactory(QObject *parent) : QObject(parent)
void ExtraCompilerFactory::registerExtraCompilerFactory(ExtraCompilerFactory *factory)
{
factories()->append(factory);
QList<ExtraCompilerFactory *> *factoryList = factories();
factoryList->append(factory);
connect(factory, &QObject::destroyed, [factoryList, factory]() {
factoryList->removeAll(factory);
});
}
QList<ExtraCompilerFactory *> ExtraCompilerFactory::extraCompilerFactories()
@@ -411,8 +419,8 @@ void ProcessExtraCompiler::runImpl(const ContentProvider &provider)
if (m_watcher)
delete m_watcher;
m_watcher = new QFutureWatcher<QList<QByteArray>>();
connect(m_watcher, &QFutureWatcher<QList<QByteArray>>::finished,
m_watcher = new QFutureWatcher<FileNameToContentsHash>();
connect(m_watcher, &QFutureWatcher<FileNameToContentsHash>::finished,
this, &ProcessExtraCompiler::cleanUp);
m_watcher->setFuture(Utils::runAsync(extraCompilerThreadPool(),
@@ -421,16 +429,17 @@ void ProcessExtraCompiler::runImpl(const ContentProvider &provider)
buildEnvironment()));
}
QList<QByteArray> ProcessExtraCompiler::runInThread(const Utils::FileName &cmd, const Utils::FileName &workDir,
FileNameToContentsHash ProcessExtraCompiler::runInThread(
const Utils::FileName &cmd, const Utils::FileName &workDir,
const QStringList &args, const ContentProvider &provider,
const Utils::Environment &env)
{
if (cmd.isEmpty() || !cmd.toFileInfo().isExecutable())
return QList<QByteArray>();
return FileNameToContentsHash();
const QByteArray sourceContents = provider();
if (sourceContents.isNull() || !prepareToRun(sourceContents))
return QList<QByteArray>();
return FileNameToContentsHash();
QProcess process;
@@ -440,7 +449,7 @@ QList<QByteArray> ProcessExtraCompiler::runInThread(const Utils::FileName &cmd,
process.start(cmd.toString(), args, QIODevice::ReadWrite);
if (!process.waitForStarted()) {
handleProcessError(&process);
return QList<QByteArray>();
return FileNameToContentsHash();
}
handleProcessStarted(&process, sourceContents);
process.waitForFinished();
@@ -456,18 +465,15 @@ QList<QByteArray> ProcessExtraCompiler::runInThread(const Utils::FileName &cmd,
void ProcessExtraCompiler::cleanUp()
{
QTC_ASSERT(m_watcher, return);
const QList<QByteArray> data = m_watcher->future().result();
const FileNameToContentsHash data = m_watcher->future().result();
delete m_watcher;
m_watcher = nullptr;
if (data.isEmpty())
return; // There was some kind of error...
const Utils::FileNameList targetList = targets();
QTC_ASSERT(data.count() == targetList.count(), return);
for (int i = 0; i < targetList.count(); ++i)
setContent(targetList.at(i), data.at(i));
for (auto it = data.constBegin(), end = data.constEnd(); it != end; ++it)
setContent(it.key(), it.value());
setCompileTime(QDateTime::currentDateTime());
}

View File

@@ -35,14 +35,19 @@
#include <QByteArray>
#include <QFuture>
#include <QHash>
#include <QList>
#include <functional>
QT_FORWARD_DECLARE_CLASS(QProcess);
QT_FORWARD_DECLARE_CLASS(QThreadPool);
namespace ProjectExplorer {
class ExtraCompilerPrivate;
using FileNameToContentsHash = QHash<Utils::FileName, QByteArray>;
class PROJECTEXPLORER_EXPORT ExtraCompiler : public QObject
{
Q_OBJECT
@@ -61,6 +66,7 @@ public:
QByteArray content(const Utils::FileName &file) const;
Utils::FileNameList targets() const;
void forEachTarget(std::function<void(const Utils::FileName &)> func);
void setCompileTime(const QDateTime &time);
QDateTime compileTime() const;
@@ -115,19 +121,19 @@ protected:
virtual void handleProcessError(QProcess *process) { Q_UNUSED(process); }
virtual void handleProcessStarted(QProcess *process, const QByteArray &sourceContents)
{ Q_UNUSED(process); Q_UNUSED(sourceContents); }
virtual QList<QByteArray> handleProcessFinished(QProcess *process) = 0;
virtual FileNameToContentsHash handleProcessFinished(QProcess *process) = 0;
virtual QList<Task> parseIssues(const QByteArray &stdErr);
private:
using ContentProvider = std::function<QByteArray()>;
void runImpl(const ContentProvider &sourceContents);
QList<QByteArray> runInThread(const Utils::FileName &cmd, const Utils::FileName &workDir,
FileNameToContentsHash runInThread(const Utils::FileName &cmd, const Utils::FileName &workDir,
const QStringList &args, const ContentProvider &provider,
const Utils::Environment &env);
void cleanUp();
QFutureWatcher<QList<QByteArray>> *m_watcher = nullptr;
QFutureWatcher<FileNameToContentsHash> *m_watcher = nullptr;
};
class PROJECTEXPLORER_EXPORT ExtraCompilerFactory : public QObject

View File

@@ -164,17 +164,14 @@ void ToolChainInformationConfigWidget::refresh()
{
m_ignoreChanges = true;
m_comboBox->clear();
m_comboBox->addItem(tr("<No compiler>"), QByteArray());
foreach (ToolChain *tc, ToolChainManager::toolChains())
m_comboBox->addItem(tc->displayName(), tc->id());
if (m_comboBox->count() == 0) {
m_comboBox->addItem(tr("<No compiler available>"), QString());
m_comboBox->setEnabled(false);
} else {
m_comboBox->setEnabled(m_comboBox->count() > 1 && !m_isReadOnly);
}
m_comboBox->setCurrentIndex(indexOf(ToolChainKitInformation::toolChain(m_kit)));
const int index = indexOf(ToolChainKitInformation::toolChain(m_kit));
m_comboBox->setCurrentIndex(index);
m_ignoreChanges = false;
}

View File

@@ -387,9 +387,7 @@ void ProjectTree::emitFilesAdded(FolderNode *folder)
Core::IDocument *document = Core::EditorManager::currentDocument();
const FileName fileName = document ? document->filePath() : FileName();
int index = Utils::indexOf(m_filesAdded, [&fileName](FileNode *node) {
return node->filePath() == fileName;
});
int index = Utils::indexOf(m_filesAdded, Utils::equal(&FileNode::filePath, fileName));
if (index == -1)
return;

View File

@@ -66,7 +66,7 @@ namespace Internal {
class ToolChainManagerPrivate
{
public:
ToolChainManagerPrivate() : m_writer(0) {}
ToolChainManagerPrivate() : m_writer(nullptr) {}
~ToolChainManagerPrivate();
QMap<QString, FileName> m_abiToDebugger;
@@ -82,7 +82,7 @@ ToolChainManagerPrivate::~ToolChainManagerPrivate()
delete m_writer;
}
static ToolChainManager *m_instance = 0;
static ToolChainManager *m_instance = nullptr;
static ToolChainManagerPrivate *d;
} // namespace Internal
@@ -111,7 +111,7 @@ ToolChainManager::ToolChainManager(QObject *parent) :
ToolChainManager::~ToolChainManager()
{
delete d;
m_instance = 0;
m_instance = nullptr;
}
ToolChainManager *ToolChainManager::instance()
@@ -349,7 +349,7 @@ QList<ToolChain *> ToolChainManager::findToolChains(const Abi &abi)
ToolChain *ToolChainManager::findToolChain(const QByteArray &id)
{
if (id.isEmpty())
return 0;
return nullptr;
ToolChain *tc = Utils::findOrDefault(d->m_toolChains, Utils::equal(&ToolChain::id, id));
@@ -446,8 +446,8 @@ public:
void addToEnvironment(Environment &env) const override { Q_UNUSED(env); }
QString makeCommand(const Environment &env) const override { Q_UNUSED(env); return QLatin1String("make"); }
FileName compilerCommand() const override { return Utils::FileName::fromString(QLatin1String("/tmp/test/gcc")); }
IOutputParser *outputParser() const override { return 0; }
ToolChainConfigWidget *configurationWidget() override { return 0; }
IOutputParser *outputParser() const override { return nullptr; }
ToolChainConfigWidget *configurationWidget() override { return nullptr; }
TTC *clone() const override { return new TTC(*this); }
bool operator ==(const ToolChain &other) const override {
if (!ToolChain::operator==(other))
@@ -487,19 +487,19 @@ void ProjectExplorerPlugin::testToolChainManager_data()
QTest::addColumn<TCList>("toDemote");
QTest::addColumn<TCList>("toRegister");
TTC *system1 = 0;
TTC *system1c = 0;
TTC *system2 = 0;
TTC *system3i = 0;
TTC *user1 = 0;
TTC *user1c = 0;
TTC *user3i = 0;
TTC *user2 = 0;
TTC *auto1 = 0;
TTC *auto1c = 0;
TTC *auto1_2 = 0;
TTC *auto2 = 0;
TTC *auto3i = 0;
TTC *system1 = nullptr;
TTC *system1c = nullptr;
TTC *system2 = nullptr;
TTC *system3i = nullptr;
TTC *user1 = nullptr;
TTC *user1c = nullptr;
TTC *user3i = nullptr;
TTC *user2 = nullptr;
TTC *auto1 = nullptr;
TTC *auto1c = nullptr;
TTC *auto1_2 = nullptr;
TTC *auto2 = nullptr;
TTC *auto3i = nullptr;
if (!TTC::hasToolChains()) {
system1 = new TTC(ToolChain::AutoDetection, "system1"); Q_UNUSED(system1);

View File

@@ -85,7 +85,7 @@ signals:
protected:
QbsBuildConfiguration(ProjectExplorer::Target *target, QbsBuildConfiguration *source);
QbsBuildConfiguration(ProjectExplorer::Target *target, Core::Id id);
bool fromMap(const QVariantMap &map);
bool fromMap(const QVariantMap &map) override;
private slots:
void buildStepInserted(int pos);

View File

@@ -0,0 +1,32 @@
/****************************************************************************
**
** 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.
**
****************************************************************************/
#include "qbspmlogging.h"
namespace QbsProjectManager {
namespace Internal {
Q_LOGGING_CATEGORY(qbsPmLog, "qtc.qbspm")
}
}

View File

@@ -0,0 +1,37 @@
/****************************************************************************
**
** 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.
**
****************************************************************************/
#ifndef QBSPMLOGGING_P_H
#define QBSPMLOGGING_P_H
#include <QLoggingCategory>
namespace QbsProjectManager {
namespace Internal {
Q_DECLARE_LOGGING_CATEGORY(qbsPmLog)
}
}
#endif // Include guard

View File

@@ -27,6 +27,7 @@
#include "qbsbuildconfiguration.h"
#include "qbslogsink.h"
#include "qbspmlogging.h"
#include "qbsprojectfile.h"
#include "qbsprojectmanager.h"
#include "qbsprojectparser.h"
@@ -176,11 +177,13 @@ static void collectFilesForProject(const qbs::ProjectData &project, QSet<QString
QStringList QbsProject::files(Project::FilesMode fileMode) const
{
Q_UNUSED(fileMode);
qCDebug(qbsPmLog) << Q_FUNC_INFO << m_qbsProject.isValid() << isParsing();
if (!m_qbsProject.isValid() || isParsing())
return QStringList();
QSet<QString> result;
collectFilesForProject(m_projectData, result);
result.unite(m_qbsProject.buildSystemFiles());
qCDebug(qbsPmLog) << "file count:" << result.count();
return result.toList();
}
@@ -431,71 +434,101 @@ bool QbsProject::needsSpecialDeployment() const
return true;
}
void QbsProject::handleProjectStructureAvailable()
bool QbsProject::checkCancelStatus()
{
QTC_ASSERT(m_qbsProjectParser, return);
const CancelStatus cancelStatus = m_cancelStatus;
m_cancelStatus = CancelStatusNone;
if (cancelStatus != CancelStatusCancelingForReparse)
return false;
qCDebug(qbsPmLog) << "Cancel request while parsing, starting re-parse";
m_qbsProjectParser->deleteLater();
m_qbsProjectParser = 0;
parseCurrentBuildConfiguration();
return true;
}
bool dataChanged = false;
m_qbsProject = m_qbsProjectParser->qbsProject();
const qbs::ProjectData &projectData = m_qbsProject.projectData();
QTC_CHECK(m_qbsProject.isValid());
if (projectData != m_projectData) {
m_projectData = projectData;
void QbsProject::updateAfterParse()
{
qCDebug(qbsPmLog) << "Updating data after parse";
rootProjectNode()->update();
updateDocuments(m_qbsProject.isValid()
? m_qbsProject.buildSystemFiles() : QSet<QString>() << projectFilePath().toString());
dataChanged = true;
}
if (dataChanged) {
auto * const futureInterface = m_qbsUpdateFutureInterface;
m_qbsUpdateFutureInterface = nullptr; // So that isParsing() returns false;
updateDocuments(QSet<QString>() << projectFilePath().toString());
updateBuildTargetData();
updateCppCodeModel();
updateQmlJsCodeModel();
emit fileListChanged();
m_qbsUpdateFutureInterface = futureInterface;
}
}
void QbsProject::handleQbsParsingDone(bool success)
{
QTC_ASSERT(m_qbsProjectParser, return);
QTC_ASSERT(m_qbsUpdateFutureInterface, return);
const CancelStatus cancelStatus = m_cancelStatus;
m_cancelStatus = CancelStatusNone;
qCDebug(qbsPmLog) << "Parsing done, success:" << success;
// Start a new one parse operation right away, ignoring the old result.
if (cancelStatus == CancelStatusCancelingForReparse) {
m_qbsProjectParser->deleteLater();
m_qbsProjectParser = 0;
parseCurrentBuildConfiguration();
if (checkCancelStatus())
return;
}
generateErrors(m_qbsProjectParser->error());
m_qbsProject = m_qbsProjectParser->qbsProject();
bool dataChanged = false;
if (success) {
QTC_ASSERT(m_qbsProject.isValid(), return);
m_projectData = m_qbsProject.projectData();
const qbs::ProjectData &projectData = m_qbsProject.projectData();
if (projectData != m_projectData) {
m_projectData = projectData;
dataChanged = true;
}
} else {
m_qbsUpdateFutureInterface->reportCanceled();
}
bool hasTargetArtifacts = false;
if (dataChanged) {
qCDebug(qbsPmLog) << "Project data changed.";
foreach (const qbs::ProductData &product, m_projectData.allProducts()) {
if (!product.targetArtifacts().isEmpty()) {
hasTargetArtifacts = true;
break;
}
}
if (!hasTargetArtifacts) {
qCDebug(qbsPmLog) << "No target artifacts present, executing rules";
m_qbsProjectParser->startRuleExecution();
return;
}
}
m_qbsProjectParser->deleteLater();
m_qbsProjectParser = 0;
if (m_qbsUpdateFutureInterface) {
m_qbsUpdateFutureInterface->reportFinished();
delete m_qbsUpdateFutureInterface;
m_qbsUpdateFutureInterface = 0;
}
if (success)
updateBuildTargetData();
if (dataChanged)
updateAfterParse();
emit projectParsingDone(success);
}
void QbsProject::handleRuleExecutionDone()
{
qCDebug(qbsPmLog) << "Rule execution done";
if (checkCancelStatus())
return;
m_qbsProjectParser->deleteLater();
m_qbsProjectParser = 0;
m_qbsUpdateFutureInterface->reportFinished();
delete m_qbsUpdateFutureInterface;
m_qbsUpdateFutureInterface = 0;
QTC_ASSERT(m_qbsProject.isValid(), return);
m_projectData = m_qbsProject.projectData();
updateAfterParse();
emit projectParsingDone(true);
}
void QbsProject::targetWasAdded(Target *t)
{
connect(t, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
@@ -605,8 +638,8 @@ void QbsProject::registerQbsProjectParser(QbsProjectParser *p)
m_qbsProjectParser = p;
if (p) {
connect(m_qbsProjectParser, &QbsProjectParser::projectStructureAvailable,
this, &QbsProject::handleProjectStructureAvailable);
connect(m_qbsProjectParser, &QbsProjectParser::ruleExecutionDone,
this, &QbsProject::handleRuleExecutionDone);
connect(m_qbsProjectParser, SIGNAL(done(bool)), this, SLOT(handleQbsParsingDone(bool)));
}
}

View File

@@ -136,7 +136,9 @@ private:
void updateApplicationTargets();
void updateDeploymentInfo();
void updateBuildTargetData();
void handleProjectStructureAvailable();
void handleRuleExecutionDone();
bool checkCancelStatus();
void updateAfterParse();
void projectLoaded() override;
static bool ensureWriteableQbsFile(const QString &file);

View File

@@ -31,6 +31,7 @@ HEADERS = \
qbslogsink.h \
qbsnodes.h \
qbsparser.h \
qbspmlogging.h \
qbsprofilessettingspage.h \
qbsproject.h \
qbsprojectfile.h \
@@ -56,6 +57,7 @@ SOURCES = \
qbslogsink.cpp \
qbsnodes.cpp \
qbsparser.cpp \
qbspmlogging.cpp \
qbsprofilessettingspage.cpp \
qbsproject.cpp \
qbsprojectfile.cpp \

View File

@@ -90,6 +90,8 @@ QtcPlugin {
"qbsnodes.h",
"qbsparser.cpp",
"qbsparser.h",
"qbspmlogging.cpp",
"qbspmlogging.h",
"qbsprofilessettingspage.cpp",
"qbsprofilessettingspage.h",
"qbsprofilessettingswidget.ui",

View File

@@ -143,12 +143,7 @@ void QbsProjectParser::handleQbsParsingDone(bool success)
// Do not report the operation as canceled here, as we might want to make overlapping
// parses appear atomic to the user.
if (!success) {
emit done(false);
} else {
emit projectStructureAvailable();
startRuleExecution();
}
emit done(success);
}
void QbsProjectParser::startRuleExecution()
@@ -168,10 +163,11 @@ void QbsProjectParser::startRuleExecution()
void QbsProjectParser::handleRuleExecutionDone()
{
QTC_ASSERT(m_ruleExecutionJob, return);
// We always report success here, since execution of some very dynamic rules might fail due
// Execution of some very dynamic rules might fail due
// to artifacts not being present. No genuine errors will get lost, as they will re-appear
// on the next build attempt.
emit done(true);
emit ruleExecutionDone();
}
void QbsProjectParser::handleQbsParsingProgress(int progress)

View File

@@ -48,6 +48,7 @@ public:
~QbsProjectParser();
void parse(const QVariantMap &config, const Utils::Environment &env, const QString &dir);
void startRuleExecution();
void cancel();
qbs::Project qbsProject() const;
@@ -55,7 +56,7 @@ public:
signals:
void done(bool success);
void projectStructureAvailable();
void ruleExecutionDone();
private slots:
void handleQbsParsingDone(bool success);
@@ -67,7 +68,6 @@ private:
QString resourcesBaseDirectory() const;
QString libExecDirectory() const;
void startRuleExecution();
void handleRuleExecutionDone();
QString m_projectFilePath;

View File

@@ -515,7 +515,7 @@ void QmakeProject::updateCppCodeModel()
// generated files:
QList<ProjectExplorer::ExtraCompiler *> proGenerators = pro->extraCompilers();
foreach (ProjectExplorer::ExtraCompiler *ec, proGenerators) {
foreach (const FileName &generatedFile, ec->targets()) {
ec->forEachTarget([&](const Utils::FileName &generatedFile) {
QString name = generatedFile.toString();
allFiles << name;
ProjectFile::Kind kind = ProjectFile::classify(name);
@@ -535,7 +535,7 @@ void QmakeProject::updateCppCodeModel()
default:
break;
}
}
});
}
generators.append(proGenerators);

View File

@@ -84,9 +84,11 @@ ModelManagerInterface::ProjectInfo ModelManager::defaultProjectInfoForProject(
<< QLatin1String(Constants::QMLTYPES_MIMETYPE)
<< QLatin1String(Constants::QMLUI_MIMETYPE);
foreach (const QString &filePath, project->files(Project::SourceFiles)) {
if (qmlTypeNames.contains(mdb.mimeTypeForFile(filePath).name()))
if (qmlTypeNames.contains(mdb.mimeTypeForFile(
filePath, MimeDatabase::MatchExtension).name())) {
projectInfo.sourceFiles << filePath;
}
}
activeTarget = project->activeTarget();
}
Kit *activeKit = activeTarget ? activeTarget->kit() : KitManager::defaultKit();

View File

@@ -26,6 +26,7 @@
#include "qmlprofilerstatewidget.h"
#include <utils/qtcassert.h>
#include <utils/theme/theme.h>
#include <QPainter>
#include <QVBoxLayout>
@@ -162,8 +163,7 @@ void QmlProfilerStateWidget::paintEvent(QPaintEvent *event)
// Background
painter.setBrush(QColor("#E0E0E0"));
painter.setPen(QColor("#666666"));
painter.setBrush(Utils::creatorTheme()->color(Utils::Theme::BackgroundColorNormal));
painter.drawRoundedRect(QRect(borderWidth, 0, width()-2*borderWidth, height()-borderWidth), 6, 6);
// restore painter

View File

@@ -29,7 +29,7 @@ namespace QmlProfilerExtension {
namespace Internal {
FlameGraph::FlameGraph(QQuickItem *parent) :
QQuickItem(parent), m_delegate(0), m_model(0), m_depth(0), m_sizeThreshold(0)
QQuickItem(parent)
{
}

View File

@@ -141,11 +141,11 @@ private slots:
void rebuild();
private:
QQmlComponent *m_delegate;
QAbstractItemModel *m_model;
int m_sizeRole;
int m_depth;
qreal m_sizeThreshold;
QQmlComponent *m_delegate = nullptr;
QAbstractItemModel *m_model = nullptr;
int m_sizeRole = 0;
int m_depth = 0;
qreal m_sizeThreshold = 0;
int buildNode(const QModelIndex &parentIndex, QObject *parentObject, int depth);
QObject *appendChild(QObject *parentObject, QQuickItem *parentItem, QQmlContext *context,

View File

@@ -34,20 +34,26 @@
#include <QUuid>
#include <QDateTime>
using namespace ProjectExplorer;
namespace QtSupport {
static QLoggingCategory log("qtc.qsxmlcgenerator");
static const char TaskCategory[] = "Task.Category.ExtraCompiler.QScxmlc";
QScxmlcGenerator::QScxmlcGenerator(const ProjectExplorer::Project *project,
QScxmlcGenerator::QScxmlcGenerator(const Project *project,
const Utils::FileName &source,
const Utils::FileNameList &targets, QObject *parent) :
ProjectExplorer::ProcessExtraCompiler(project, source, targets, parent)
{ }
QList<ProjectExplorer::Task> QScxmlcGenerator::parseIssues(const QByteArray &processStderr)
ProcessExtraCompiler(project, source, targets, parent)
{
QList<ProjectExplorer::Task> issues;
QTC_ASSERT(targets.count() == 2, return);
m_header = m_tmpdir.path() + QLatin1Char('/') + targets[0].fileName();
m_impl = m_tmpdir.path() + QLatin1Char('/') + targets[1].fileName();
}
QList<Task> QScxmlcGenerator::parseIssues(const QByteArray &processStderr)
{
QList<Task> issues;
foreach (const QByteArray &line, processStderr.split('\n')) {
QByteArrayList tokens = line.split(':');
@@ -55,10 +61,10 @@ QList<ProjectExplorer::Task> QScxmlcGenerator::parseIssues(const QByteArray &pro
Utils::FileName file = Utils::FileName::fromUtf8(tokens[0]);
int line = tokens[1].toInt();
// int column = tokens[2].toInt(); <- nice, but not needed for now.
ProjectExplorer::Task::TaskType type = tokens[3].trimmed() == "error" ?
ProjectExplorer::Task::Error : ProjectExplorer::Task::Warning;
Task::TaskType type = tokens[3].trimmed() == "error" ?
Task::Error : Task::Warning;
QString message = QString::fromUtf8(tokens.mid(4).join(':').trimmed());
issues.append(ProjectExplorer::Task(type, message, file, line, TaskCategory));
issues.append(Task(type, message, file, line, TaskCategory));
}
}
return issues;
@@ -68,11 +74,11 @@ QList<ProjectExplorer::Task> QScxmlcGenerator::parseIssues(const QByteArray &pro
Utils::FileName QScxmlcGenerator::command() const
{
QtSupport::BaseQtVersion *version = nullptr;
ProjectExplorer::Target *target;
Target *target;
if ((target = project()->activeTarget()))
version = QtSupport::QtKitInformation::qtVersion(target->kit());
else
version = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::defaultKit());
version = QtSupport::QtKitInformation::qtVersion(KitManager::defaultKit());
if (!version)
return Utils::FileName();
@@ -82,14 +88,10 @@ Utils::FileName QScxmlcGenerator::command() const
QStringList QScxmlcGenerator::arguments() const
{
QTC_ASSERT(targets().count() == 2, return QStringList());
QTC_ASSERT(!m_header.isEmpty(), return QStringList());
const Utils::FileName fn = tmpFile();
const QString header = m_tmpdir.path() + QLatin1Char('/') + targets()[0].fileName();
const QString impl = m_tmpdir.path() + QLatin1Char('/') + targets()[1].fileName();
return QStringList({ QLatin1String("--header"), header, QLatin1String("--impl"), impl,
fn.fileName() });
return QStringList({ QLatin1String("--header"), m_header, QLatin1String("--impl"), m_impl,
tmpFile().fileName() });
}
Utils::FileName QScxmlcGenerator::workingDirectory() const
@@ -109,19 +111,19 @@ bool QScxmlcGenerator::prepareToRun(const QByteArray &sourceContents)
return true;
}
QList<QByteArray> QScxmlcGenerator::handleProcessFinished(QProcess *process)
FileNameToContentsHash QScxmlcGenerator::handleProcessFinished(QProcess *process)
{
Q_UNUSED(process);
const Utils::FileName wd = workingDirectory();
QList<QByteArray> result;
foreach (const Utils::FileName &target, targets()) {
FileNameToContentsHash result;
forEachTarget([&](const Utils::FileName &target) {
Utils::FileName file = wd;
file.appendPath(target.fileName());
QFile generated(file.toString());
if (!generated.open(QIODevice::ReadOnly))
continue;
result << generated.readAll();
}
return;
result[target] = generated.readAll();
});
return result;
}
@@ -132,9 +134,9 @@ Utils::FileName QScxmlcGenerator::tmpFile() const
return wd;
}
ProjectExplorer::FileType QScxmlcGeneratorFactory::sourceType() const
FileType QScxmlcGeneratorFactory::sourceType() const
{
return ProjectExplorer::StateChartType;
return StateChartType;
}
QString QScxmlcGeneratorFactory::sourceTag() const
@@ -142,8 +144,8 @@ QString QScxmlcGeneratorFactory::sourceTag() const
return QStringLiteral("scxml");
}
ProjectExplorer::ExtraCompiler *QScxmlcGeneratorFactory::create(
const ProjectExplorer::Project *project, const Utils::FileName &source,
ExtraCompiler *QScxmlcGeneratorFactory::create(
const Project *project, const Utils::FileName &source,
const Utils::FileNameList &targets)
{
return new QScxmlcGenerator(project, source, targets, this);

Some files were not shown because too many files have changed in this diff Show More