Commit Graph

64 Commits

Author SHA1 Message Date
Leena Miettinen
eecd2a5aa1 Doc: Fix QDoc warnings in Core plugin classes
Task-number: QTCREATORBUG-23620
Change-Id: Idf1fb2b3f930812c3cf18b9f8ced03fb8e0947be
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-18 13:39:43 +00:00
hjk
36fcd52136 Utils: Add toSet/toList functions
As replacement for functionality that's being deprecated
in Qt but still useful or needed, or that cannot easily be handled
without resorting to #if QT_VERSION checks in user code.

Change-Id: Id3575a54ff944bf0e89d452d13944fcaee270208
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-02 12:48:54 +00:00
Alessandro Portale
f36f04deba Core: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init (partially)

Change-Id: Idf10d7ffb1d98a04edc09a25c35e4e9e3abe87b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-08 16:04:21 +00:00
Eike Ziller
6e66b2a078 Remove some lambdas from Utils::transform calls
It is often possible to user (member) functions or members directly.
That improves readablility and potentially reduces the total number of
symbols.
Also use qobject_container_cast at places where it is appropriate.

Change-Id: Ia2591bca356591e001e2c53eeebcf753e5bc3c37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-05-28 13:45:20 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
hjk
caf3623ef2 Core: Make enough room in an Id to store a pointer directly.
This switches internal storage from an (signed) int to an quintptr,
making it possible for client code to use Ids directly based on
pointers using Id::fromUniqueIdentifier().

Ids generated by existing code will keep using the low 32 bits only
for now, so the change effectively only affects 64 bit systems.

The patch also moves the rarely used fromUniqueIdentifier code
path out-of-line and replaces the Id::IdsPerPlugin and
Id::ReservedPlugins enums in the only place where they have been
used (setting a lower limit for ids). The limit itself not really
useful, but unchanged by this patch.

Change-Id: Ieabc7d9d72f3c5dd749fb49b7193a0c8629c186e
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-12-15 12:00:24 +00:00
Tobias Hunger
fb99157abd Core::Id: Handle empty strings passed to fromString()
Return Id() in that case. Currently we can convert the invalid Id
to a string, but when we try to convert that string back to an Id
there is a soft assert.

Change-Id: Iad8443ff65a643030bd47446ec2dcf2889d2e4eb
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-12-04 12:57:00 +00:00
Tobias Hunger
723463e72c Id: Make versionedId QTC_ASSERT that there is a major version
There are no more users that use this without giving at least a
major version.

Change-Id: I4ed3c41eb87811435b9e354aa4b2ae8cc1979681
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-02 14:49:32 +00:00
Tobias Hunger
4b0a8648e4 FeatureProvider: Remove Feature and FeatureSet
Use Core::Id for Feature and QSet<Core::Id> for FeatureSet.

Change-Id: I12341036bd9eaa82589d92bd3f7d21f2e6b737bd
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-02 14:49:17 +00:00
Tobias Hunger
3a35d36b02 Core::Feature: Add some functionality currently implemented in Core::Feature
Convert a QSet<Id> to/from a stringlist and add the methods to create
versioned ids and id sets.

Most of the code goes into Core::Id, but the code to generate sets of
versioned ids moves into BaseQtVersion which is the only user.

Change-Id: Id52474fac2aa0563e48b2b714dcfef533350c729
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-01 13:09:36 +00:00
Tobias Hunger
7225f300dc Id: pack StringHolder class
Change-Id: If2c10725d60a0c2aaada515649bd33738e5d1de5
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-11-30 12:01:01 +00:00
hjk
cbe27c5c44 Core: Remove unused Id::registerId
This was intended to avoid the char * -> int mapping at all, but
was never actively used.

Change-Id: Ief119cc2ff2c8b4ed404c9eb534e17265a3562e6
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-19 11:09:15 +00:00
Nikolai Kosjar
b0e1dbb9b9 Core: Compile fix
Change-Id: I7902f9d73c5bee200403cc3a1764d265304b8166
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-16 09:33:43 +00:00
David Schulz
5bc35c5dfa Core: Add debug stream operator for Core::Id
Change-Id: Ieeb299709d9e18d1db0632b245b735fe07230a89
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-16 08:59:34 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Christian Kandeler
93304df038 Always pass Core::Id by value.
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.

Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-01 11:52:08 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Eike Ziller
63ff745213 Merge remote-tracking branch 'origin/2.8'
Conflicts:
	src/libs/extensionsystem/pluginmanager.cpp
	src/libs/extensionsystem/pluginspec.cpp
	src/plugins/coreplugin/basefilewizard.cpp
	src/plugins/coreplugin/coreplugin.pro
	src/plugins/coreplugin/coreplugin.qbs
	src/plugins/coreplugin/editormanager/ieditor.cpp
	src/plugins/coreplugin/externaltool.cpp
	src/plugins/coreplugin/icore.cpp
	src/plugins/cpptools/cppmodelmanager.cpp
	src/plugins/fakevim/fakevimhandler.cpp
	src/plugins/find/ifindfilter.cpp
	src/plugins/projectexplorer/buildstep.cpp
	src/plugins/projectexplorer/devicesupport/idevice.cpp
	src/plugins/projectexplorer/runconfiguration.cpp
	src/plugins/vcsbase/vcsbaseeditor.cpp
	tests/system/suite_debugger/tst_simple_analyze/test.py

Change-Id: I11dc9e60bfc14bad4f8af747d041fc7678a07c17
2013-09-27 10:44:32 +02:00
Leena Miettinen
120bf88eab Doc: edit coreplugin docs
Remove \brief commands for functions.
Use standard wording for QDoc commands.
Fix style and grammar issues.
Use the \a command instead of the \c command for attributes
in function descriptions.
Do not use \returns, because it does not exist.

Change-Id: Icd32b519670cb376e246bab3a58fe7e98d2529ea
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-09-26 10:29:13 +02:00
Eike Ziller
e8469a2bab Merge remote-tracking branch 'origin/2.8'
Conflicts:
	src/plugins/fakevim/fakevimhandler.cpp

Change-Id: I8101f18b87859924644471817d4f1408790d5628
2013-06-25 10:14:14 +02:00
Leena Miettinen
41411165ba Doc: use standard wording in \brief commands
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."

Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-06-20 11:22:47 +02:00
Eike Ziller
afe1d5ee65 Merge remote-tracking branch 'origin/2.8'
Conflicts:
	src/plugins/coreplugin/documentmanager.cpp

Change-Id: I6dc025bc0f31eb694c8d9e2dd4ea5cc888ee8a94
2013-06-14 16:21:04 +02:00
Christian Kandeler
482969186d Core: Fix build.
Change-Id: Id11aadb251a91bc579979dab971ea45960aabb86
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-06-06 18:00:29 +02:00
Leena Miettinen
26c412deac Doc: fix function signatures in code documentation
QDoc cannot find functions if the signature in the \fn command
is not identical to the declaration, including 'const' qualifiers.

Removed the \fn where the documentation comes immediately before the
function, as qdoc does not need it in that case.

Change-Id: If6a2a2e2d58b394905c803787d2a93489049e4ca
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-05-23 16:30:35 +02:00
hjk
fe29d6a8a3 Core: Remove Core::Id(QByteArray) constructor
This was mostly used to disambiguate the char * and the QString
constructors.

Change-Id: Ib6923ef8e8c0e5d514a883e73aa001a1cd9fb534
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-04 16:47:59 +02:00
hjk
dcfc617cc8 Core: Add streaming operators for Core::Id
Only used once so far, but makes intended usage clear.

Change-Id: Ia628f5356dd02282e233846268d6c0629e93e3fe
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-02 14:56:28 +02:00
Friedemann Kleint
cf5e615f6d Clean headers in Core-plugin.
Change-Id: Ie79d334765ca5c6a034fa2f5eccff5d45b481975
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-27 09:31:54 +01:00
hjk
2d7e49c794 Core: Remove deprecated and now unused Core::Id(QString) constructor
Change-Id: I0eff48af98b3fd3ff244386a4424aa9dd0648919
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-22 11:10:36 +01:00
hjk
090638c241 Core: add a 'suffixAfter' function
Pure convenience for the decomposition of ids constructed wit suffix().
This will help centralizing repeated code in the qnx, blackberry, android
and cmake plugins.

Change-Id: Ibc9ca21f8da1d15578f4553da97212cc99a5c5b9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-22 08:33:47 +01:00
hjk
2330fb4850 Core: Add a convenience .withSuffix(QString) method
Change-Id: Ia6a1802376442d3e3ccdce2b0a061c71edafa8c9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-19 15:22:37 +01:00
Oswald Buddenhagen
6bbdeec812 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/qnx/blackberrydeployconfiguration.cpp

Change-Id: I16d1c7717f4bc25ba7e8dbdd5be6580fafe3f33d
2013-02-28 12:02:40 +01:00
Yuchen Deng
cf026c9f87 Fix a warning found by MSVC2010_64
Change-Id: Ie9ae9a8c8bff87a610606e3a6075987a08ed0644
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-02-19 14:21:28 +01:00
Joerg Bornemann
922165d4dc fix typo in Core::Id documentation
Change-Id: I303a4c1790752a4c41bd265994be2e4932e458cc
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-02-08 17:59:05 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Tobias Hunger
3e7d00749f Core::Id: Do not warn when reading invalid ids from settings
Change-Id: Ic2fc0df7f3ac5e8006123bf94c4e55a3a7d86593
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-01-28 13:08:19 +01:00
Tobias Hunger
4e5e6b45fe Core::Id: Fix possible crash in operator ==
Revert a workaround applied earlier

Change-Id: I825bdf6df662a5509166b9b7d12a4fb305cba6cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-01-23 15:59:19 +01:00
hjk
baffa492d9 Core: simplify ILocator interface
Use data members instead of virtual functions for id, displayName and
priority, use Core::Id, not QStrings for id, de-pimpl CommandLocator.

Change-Id: Id8b41f184cb995138b2d76c923d6d3ae02b7e3f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-18 15:51:13 +01:00
hjk
42c16ff7d3 Core: Use the new Id methods in a few places
There are a lot more left.

Change-Id: I97d32629aa6deef0f4819f70cc0b8437f2814257
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-01-17 10:57:22 +01:00
hjk
931627e86c Core: add convenience functions to Core::Id.
These are meant to help the outphasing of the Id(QString) constructor
and generally split the interface into "persistent" and "non-persistent".

Change-Id: Id23f613c304e020044e4996448d68164725c898c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-01-15 11:23:46 +01:00
Daniel Teske
0d3683450f Fix crash on Core::Id().toString()
Change-Id: I515c5df8480f54e49ef0873472b54459f2db5a81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-12-11 13:38:11 +01:00
hjk
cfde02f60a Create a way to pre-register Core::Ids
This enables using integral values in addition to strings as key.

Change-Id: I0d03441eab4172b31f813d478bdd2946d7056117
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-12-05 14:37:01 +01:00
Orgad Shaneh
7c4e2b6c60 Id: Add QByteArray constructor
Distinguish from const char * one.

QString ctor is yet to be removed

Change-Id: I2da231036c6417353b0566d39666d918ad141c6d
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-20 08:57:35 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Daniel Teske
77288af63e IdCache: Use delete[] for memory qstrdup allocated
Change-Id: Id39e31191116196e1a9385e0d22bef0bfbb6c861
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-13 17:38:03 +02:00
Kai Koehne
c636fc2efe Core: Fix MSVC compiler warning about strdup
Fix

 warning: C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.

 By just using qstrdup.

Change-Id: I40664b6ed763b27951d983ec13dcc638270a1beb
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-27 12:55:06 +02:00
hjk
7ca93f9b1e coreid: add overload for ==(const char *)
Saves code on caller side and cycles for the hashing.

Change-Id: I9d0c739b44a4611a4d70d33cf2798e0b078a72b5
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-08-06 09:14:25 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
hjk
7ba0a4de9c debugger: add dumper for Core::Id
Change-Id: Ibcc5b0e80acf037ed87b79ae4f52a1b0677388eb
Reviewed-by: hjk <qthjk@ovi.com>
2012-07-18 12:39:54 +02:00