summaryrefslogtreecommitdiff
path: root/src/libs/utils/utils-lib.pri
Commit message (Collapse)AuthorAgeFilesLines
* Introduce Utils::DisplayNameChristian Kandeler2019-08-021-0/+2
| | | | | | | | The concept of a default display name as used in ProjectConfiguration is useful, and we'd like to use it elsewhere. Change-Id: I10d9a5bd3d3e385a99f1122c6b119136662502fa Reviewed-by: hjk <hjk@qt.io>
* FancyLineEdit: Add camel case navigationAndre Hartmann2019-08-021-2/+4
| | | | | | | | | | | | Use it for search and replace functions as well as for Locator. The camel case navigation can be switched on / off with the existing menu Options > Text Editor > Behavior > Enable Build-in camel case navigation. Fixes: QTCREATORBUG-21140 Change-Id: I3f2dcafff231366b3c8f08c14514dd8940cca2a0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Lump ConsoleProcess files togetherhjk2019-07-251-4/+0
| | | | | | | | | | ... to reduce scope of conditionally compiled code which causes regularly problems when forgetting about their special nature. The code model isn't a big fan either. Change-Id: I6a85b694b59a293daf4b9aab7c8e81c7ca284f0d Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/4.10'Tim Jenssen2019-07-121-1/+0
|\ | | | | | | Change-Id: Iaf27911e4e9fb762c1a24c84c458462bafe95728
| * Utils: Move reuse.h out of sighthjk2019-07-051-1/+0
| | | | | | | | | | | | | | | | It caused a deprecation warning in each user. The warning itself is not gone but appears less often now. Change-Id: I03a995897635a182fa254fa574ccbfbfc7515f1a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Enable macro editing for the Clang indexerMarco Bubke2019-06-131-3/+13
|/ | | | | | | | Refactor much of the code from Environment* classes to NameValue* classes to share it with the preprocessor macro settings. Change-Id: Ica4ee817aa338230c422b30d91240d266248d226 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ClangFormat: Add the interaction with BeautifierIvan Donchevskii2019-04-291-0/+1
| | | | | | | | Do not allow ClangFormat plugin to format on file save when the Beautifier has the same checkbox selected. Change-Id: I655d77a888cc444ccb02c4e72f11a93b3ab9bbd5 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Utils: Introduce ListModel convenience for one-level tree modelhjk2019-03-011-1/+2
| | | | | | | | This is only syntactic sugar, but helps to squash fears of TreeModel being "overkill" for a simple list. Change-Id: I5069229f79c224f10fcbb2fe7081677a127eb533 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.9'Orgad Shaneh2019-02-151-2/+5
|\ | | | | | | Change-Id: If4e8f52fc94c4e5fd9ec69c9000436d4ded913ff
| * Utils: Add a JsonTreeItemDavid Schulz2019-02-121-2/+5
| | | | | | | | | | | | | | | | | | JsonTreeItem is used to visualize json values in tree views. It will automatically generate new child items if the value contains an object or array. Change-Id: I316ea9f626050c21c05cbfc0628d0a5e20ad5a49 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Move qrc parser from QmlJS to UtilsChristian Kandeler2019-02-131-1/+3
|/ | | | | | | | We'd like to make use of it in a more general context, and it's not directly related to QML. Change-Id: I025ec67829f85544667684cdb8c99d1ee4c18197 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add macOS touch bar supportEike Ziller2019-01-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a generic Utils::TouchBar that implements a touch bar for macOS based on QAction. Touch bars can be nested, and one is set to be the application's top level touch bar. Also add an ActionContainer for the touch bar. That allows us to manage the layout of the touch bar the same way we do with menus. Since the touch bar is an input device with very limited space, a command in the touch bar needs to be specifically styled for the touch bar by setting either touchBarText or touchBarIcon (or both). Touch bars can be nested by nesting the ActionContainers. A nested touch bar ActionContainer needs to specify an icon and/or text to show in the touch bar button that opens that sub-bar. Commands are only shown in the touch bar if they are valid within the current context. Implementation-wise we cannot use the standard NSPopoverTouchBarItem for nesting touch bar levels. We cannot hide items in the touch bar, because hidden items still take up space in the touch bar. So we need to rebuild the touch bar regularly. Since the items we show are very dynamic, every time the items in the toplevel bar change because of a context change, any opened sub-level touch bar closes. That is why we maintain a stack of touch bar levels ourselves, replacing the main touch bar with the current level, and managing opening and closing the levels manually. This patch adds buttons for Help, Bookmarks, Header/Source, Follow (Symbol), Decl/Def, and a sub-bar for the debugger actions. Fixes: QTCREATORBUG-21263 Change-Id: Ib63e610f21a993f1d324fe23c83a7f2224f434ac Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
* Utils: Move C++ language details from ProjectExplorer to UtilsMarco Bubke2019-01-151-1/+2
| | | | | | | | We want to use them in the backend processes too so it's nice to share them in Utils. A concrete size was added too because they should be serialized. Change-Id: Id5eb8f46643d5159f034fc9559f68a08d7e5847a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Utils: Introduce GlobalFileChangeBlockerOrgad Shaneh2019-01-081-0/+2
| | | | | | | | | | Tracks application state, and signals when it is changed. Supports forcing blocked state with reference counting. Change-Id: Ic173d42446b1b08bd4a1e7c1acf38c68644d30b3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Beautifier: Move formatting tools to TextEditorIvan Donchevskii2018-08-301-2/+4
| | | | | | | | | | | | Formatting is moved from Beautifier plugin to formattexteditor.h/.cpp. Diff and Differ classes are extracted from DiffEditor to Utils to prevent extra TextEditor dependencies. This change will make possible to use formatCurrentFile and similar functions not only from Beautifier code. Change-Id: Ic5ca668afe88f4e9376d49e6bd3594807172b0dd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Improve macOS dark mode supportMorten Johan Sørvig2018-08-241-0/+2
| | | | | | | | | | | | | | | | | | | | | The current theme support in Creator works well, also in macOS dark mode. This change makes sure that the native macOS appearance setting (for the Creator process) and the creator theme setting are in sync. This is required to avoid light/dark palette issues for the light Creator themes when the desktop is configured for dark appearance. Add a “DarkUserInterface” flag to the creatortheme files. This flag indicates if the theme is overall dark, with light text on dark background. Make setCreatorTheme() force the standard light aqua appearance for light Creator themes. Change-Id: I1a5c183230ab0e66641fd834df19d7e0ad1b6a53 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Move PathChooserDelegate to UtilsDavid Schulz2018-07-231-2/+2
| | | | | Change-Id: I94b3c0b60477145f0f084719fc1cf5f3f4a98534 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Purge qtcfallthrough.hOrgad Shaneh2018-04-091-1/+0
| | | | | | | No longer needed. Change-Id: I9b0bee014df89d4c567f1d2431b5ff9404f5f925 Reviewed-by: hjk <hjk@qt.io>
* Utils: Purge asConstOrgad Shaneh2018-04-091-1/+0
| | | | | | | | Replace by qAsConst. Change-Id: I3301366f73c066c86f08df7188d70dc3b613c55c Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Utils: Add pointeralgorithm.hTobias Hunger2018-03-121-0/+1
| | | | | Change-Id: I3e81bdbf22808efbe1fb5fab13bef24c8f73f404 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Revert "Utils: Add a ObjectPool convenience class template"hjk2018-02-211-1/+0
| | | | | | | | | | | | This reverts commit f6715fe52b168ac94f27d7bd1f6163fd318315e4 which introduced this. It was prepering infrastructure for having ownership of sets of objects handled separately from the global pool, but that's not wanted and needed anymore. Change-Id: I7368da624ea99bb70a6a1cce04677257322dc605 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add implementation of std::variantEike Ziller2017-12-211-0/+2
| | | | | | | Type-safe unions for C++. Change-Id: I3c1eb89a240a11d27b07acae588a924a0618173e Reviewed-by: hjk <hjk@qt.io>
* Move RemoveFileDialog to UtilsEike Ziller2017-12-121-4/+7
| | | | | Change-Id: I88892fc8d43ca3f59598b5b44e0daac0bfb439b5 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Rename LineColumnLabelEike Ziller2017-12-071-4/+4
| | | | | | | It is not only used for line and column. Change-Id: I544244dbca0b9f084e45ff2d7e4f28f79d2cae09 Reviewed-by: David Schulz <david.schulz@qt.io>
* TextEditor: move Link class to separate header in UtilsIvan Donchevskii2017-11-271-1/+2
| | | | | | | Link is a common class and is used across the plugins. Change-Id: Id92e47e1b8604316ca8b970804e57abaf404ec28 Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Add simple LineColumn classMarco Bubke2017-11-231-1/+2
| | | | | | | | | There are many places where line and column are returned by writable parameters which is not so readable. This simple class makes it easier to return line and column as one value. Change-Id: I4836088e76d0ee5decd713ab616fde2f8a97c74b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Move SettingsAccessor from ProjectExplorer into UtilsTobias Hunger2017-11-201-0/+2
| | | | | Change-Id: I83e9d7ef81f8c0af7220ce2777723db53ef2e02a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add a bread crumb widget to file system viewEike Ziller2017-11-141-2/+4
| | | | | | | | Which allows easy navigation to any parent of the current selection. Task-number: QTCREATORBUG-19203 Change-Id: I97179a4800afd92a21bd0fa466fbfda4ac1a5846 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Rename CamelHumpMatcher -> FuzzyMatcherOrgad Shaneh2017-11-021-2/+2
| | | | | Change-Id: Ia8a2eeb985bcdd500b4faf9605e5092a52dad372 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Utils: Add predicates for comparison to constant valuesMarco Bubke2017-10-271-0/+1
| | | | | | | | | | | | | | | | | | Many STL algorithms have value version. So you can only use a predicate: std::stable_partition(std::begin(list), std::end(list), [](int entry) { return entry < 20; }); With this predicates you can write it in a shorter form: std::stable_partition(std::begin(list), std::end(list), lessThan(20)); The find helpers are moved to predicates too. Change-Id: I791b3105ca84ef7c5a519d22589a91b5548cf3e4 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/4.5'Eike Ziller2017-10-191-2/+0
|\ | | | | | | Change-Id: Ie83666bd18e899dabf5190c360027bf02abecdaf
| * Remove unused class BraceMatcherEike Ziller2017-10-191-2/+0
| | | | | | | | | | Change-Id: I8caac292ab36a28ed7e3d73d0a90d06ea1e88b0d Reviewed-by: David Schulz <david.schulz@qt.io>
* | Move URL utilities from ProjectExplorer to UtilsUlf Hermann2017-10-051-2/+4
|/ | | | | | | This way we can access them from the qmldebug library. Change-Id: I90ba80228f44a9d5ea825ad59f4bd1572969980e Reviewed-by: hjk <hjk@qt.io>
* Benchmarks: Provide infrastructure for benchmarksTobias Hunger2017-09-251-1/+4
| | | | | | | | | | | | | | | | | | | | | ... and use it for the profiling report. Instantiate a Utils::Benchmarker(...) to report a data point (which will be created at destruction time, reporting the live-time of the object). Alternatively you can use Utils::Benchmarker::report(...) to record your data point. Independent of how you create a datapoint, it will be reported through the qtc.benchmark logging category and can get pushed to a database from a script parsing creator's output. Note: The plugin-loading uses the existing -profiling infrastructure, so you need to start Creator with -profile to see data points. Change-Id: I18e6b84137d0f49ee5e12e7c3d75323005ce5a29 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TextEditor: move convenience from texteditor to utilsIvan Donchevskii2017-09-221-2/+4
| | | | | | | Allows to use this header without texteditor dependency. Change-Id: I706f42799c3ea42473a716fa9ef9f3cfbef6fdd4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-08-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/libs/utils/utils-lib.pri src/plugins/clangcodemodel/clangbackendipcintegration.h src/shared/qbs Change-Id: I240e89afc76d8f40ce69d66683014b603f714707
| * Utils: Fix typo in pri fileEike Ziller2017-08-221-1/+1
| | | | | | | | | | Change-Id: Ibf35bbfe6836bac524e61f11747f1b0fb164e112 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Extract CamelHumpMatcher for use in the C++/QML locator filtersAndre Hartmann2017-08-041-2/+4
|/ | | | | | Started-by: David Kaspar <dkaspar@blackberry.com> Change-Id: I928ccdc4084f8d07826746c771e7fca6994f95ab Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Locator: Fix diverse issues with drawing highlighted textEike Ziller2017-07-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To draw the result items with highlighted parts, we split the text to draw into "before highlight", "highlight" and "after highlight", and painted them separately. This had several issues: It breaks the text layout. Characters within a text are often started at subpixels, which was not so visible in the static search results, but lead to ugly artifacts while typing in Locator (enter a search term, and then continue adding characters that still match the first found item, and watch the effect in the "after highlight" part). It needs a lot of custom painting code. Properly supporting text elide modes is hard, scaling to more than one highlight as well. Reusing parts of the QItemDelegate base functions also has its issues, e.g. that clipping doesn't work well. Instead, QItemDelegate::drawDisplay should make it possible to set format ranges for the text it draws. This patch copies part of QItemDelegate to be able to add this parameter. Unfortunately Qt currently has a bug (QTBUG-62019) that character backgrounds are not painted far enough (1 pixel to the right has the wrong background), which looks very ugly in selected items in the search results. So we use the new delegate only for Locator for now, to be used later for the search results too, when that bug is fixed. Task-number: QTCREATORBUG-18532 Change-Id: Idf59b2c2bcfa6b188a810f7a3128a81e7e6fffb1 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: David Schulz <david.schulz@qt.io>
* Add Q_FALLTHROUGH for Qt < 5.8Christian Kandeler2017-07-171-0/+1
| | | | | | | | | | | | | | ... and make use of it. With gcc 7, the new option -Wimplicit-fallthrough is introduced and added to the -Wextra set, triggering dozens of warnings in our sources. Therefore, we annotate all obviously intended fall-throughs. The ones that are still left are unclear and need to be checked by the respective maintainer. Change-Id: I44ead33cd42a4b41c28ee5fcb5a31db272710bbc Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove the last usage of deprecated Carbon APIs from Qt CreatorJake Petroules2017-07-101-2/+3
| | | | | | | | Change-Id: I05c8345e5f1618e7ecbb8a9c27feb5b9a321dc11 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Add std::experimental::optional as Utils::optionalEike Ziller2017-06-161-1/+3
| | | | | | | | | Uses the reference implementation of the proposal, which later can be replaced by the std lib implementation depending on compiler and used C++ version. Change-Id: I23f2f8077f4cb26c3d9a403b1ce438b6cdb163f2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Utils: Add a ObjectPool convenience class templatehjk2017-03-031-0/+1
| | | | | | | | | | | | | | | | | | The ObjectPool class template provides parts of the functionality of the global PluginManager object pool but is intented to be used with smaller set objects, typically with same base type (e.g. factories) only. The ObjectPool takes ownership of add items if and only if the item does not have a QObject parent. Items owned by the Object pool are destructed when the pool is destructed, the other items are taken care of by their QObject parent according to the usual parent/child behavior. Change-Id: I60886095c8b04eae017e1fb56774b1bf66dbefa1 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Move forward declaration of SmallString in an extra headerMarco Bubke2017-02-021-1/+2
| | | | | Change-Id: I6da1cc60d425f654a31570373eb3b4f660d5f975 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Utils: Introduce a TemporaryDirectory and TemporaryFile classTobias Hunger2017-01-201-0/+4
| | | | | | | | Both wrap the corresponding Qt class, but make sure all temporary files or directories are created inside a "master temporary directory". Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Utils: Add a Utils::asConst() mimicing C++17's std::as_consthjk2017-01-181-1/+2
| | | | | | | | | | | | | There will be a while until we can require C++17, but as_const is useful today. the Real Thing, but it's probably less hassle to do a global s/Utils::asConst/std::as_const/ at some time in the future than to fight potential name clashs until then. Change-Id: I22fc4e01f4bcc6d99126b5d00a12ce3cacf536dc Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Move ProcessHandle to Utils for further re-usehjk2017-01-171-0/+2
| | | | | | | | | | | | | | Also, use qint64 instead of quint64, as this is what Qt uses. Keep 0 for invalid PIDs, even if arguably -1 would be better, but Qt uses 0, too. Don't move 'toString', instead inline it into the only caller, keeping translations intact. Task-number: QTCREATORBUG-17596 Change-Id: Ie9411ea1d2031a5ab0a99bcb3ff48ee430afe254 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix exports for shared librariesMarco Bubke2017-01-161-1/+1
| | | | | | | | We use "shared" to define a shared library and not dll. Change-Id: Ia97ebd0042a7ef0f33eadaa448d9a44b42331ad1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* make library defines more consistencyTim Jenssen2016-12-121-1/+1
| | | | | Change-Id: I211d511667d5b9c8f518bfbe750aca4483baff62 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: fix that utils can be used in testsTim Jenssen2016-11-021-0/+9
| | | | | | Change-Id: I1f530f3f63e22719de6faed7f55c66282d4044e8 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marco Bubke <marco.bubke@qt.io>