Commit Graph

46 Commits

Author SHA1 Message Date
hjk
19a6428f54 More deprecation induced busywork
QString::count() will vanish.

Change-Id: I65672fa648c0969930e9398ec4e541a0771c8a57
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-08 07:00:01 +00:00
Jarek Kobus
c26db7a657 SdkPersistentSettings: Fix build
Amends bb4d9c92e7

Change-Id: If20b80f30d87b1be8f606cab402c5a220fa68d07
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-06 16:23:46 +00:00
hjk
bb4d9c92e7 SdkTool: Fork utils/persistentsettings
And a few helper classes. This allows SdkTool being build
without Creator's Utils, and does not impose restrictions
on the development there.

Change-Id: Id15db9293f343ad2aeee5c09cc819d112ec144e4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-06 13:37:52 +00:00
hjk
66c08a824d Utils: Rename most FilePath::{from,to}Variant uses to {from,to}Settings
Specifies the main purpose more clearly. The remaining ones a "true"
(internal) variants in models and as action data.

Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 09:00:30 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Artem Sokolovskii
48e2f79e8b SdkTool: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I231597f60c7ddad00f7166e7d09c1c5b2ff48657
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-30 10:04:46 +00:00
Christian Stenger
8c7c655356 SdkTool: Fix build with Qt5
Amends c246caf7a9.

Change-Id: I5835751f7312acbe8f171c3e61d4836111849421
Reviewed-by: hjk <hjk@qt.io>
2022-04-05 06:24:20 +00:00
Marcus Tillmanns
c246caf7a9 sdktool: Change tests to use QTest
* Moved all sdktool code into a static library, allowing us to link against the actual functionality in unittests
* Convert all tests to proper unittests

Change-Id: I5c93be0faecbd8b68e0923655483c870a2f408b5
Reviewed-by: hjk <hjk@qt.io>
2022-04-04 14:27:46 +00:00
hjk
44493857c2 SdkTool: Use slightly less repetitive approach for operation interface
Change-Id: I4d1d205c610df39be6a810dfda3049ae14a06806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-10 15:06:36 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Christian Stenger
37a10f4a2b SdkTool: Fix path handling and adjust expectation
Amends 1a6e6825e6.

Change-Id: I0e0c1bf46951a05d360032e01c15ff8adb31ac33
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-11-23 10:59:24 +00:00
hjk
1a6e6825e6 SdkTool: Allow remote paths in various operations
QDir::cleanPath() doesn't work well with the scheme://... syntax.

Change-Id: I2d2a86e416251ea2396b67ab1e5831444d4a979a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-19 13:56:01 +00:00
Christian Stenger
d73c271259 sdktool: Adapt tests
The names for registered Qt, cmake and toolchain must
no more be unique.
Amends e9e4c27e3a.

Change-Id: Icea00636f3632148f209616de3473816e12e4655
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-03 05:55:32 +00:00
Eike Ziller
e9e4c27e3a sdktool: Do not fiddle with display names
sdktool made the "display names" unique by potentially adding a number.
This has multiple drawbacks:
- The display name can contain variables that lead to
  unique _expanded_ names
- Adding a number doesn't really help for distinguishing things
- That number is then hard-baked into the install settings

Installers should take care that they register identifiable names.
And if we really want to ensure unique names, then Qt Creator can do that
itself, or even better leave the user to do it, because a number doesn't
really help anyhow.

Fixes: QTCREATORBUG-17909
Change-Id: Id0f44c0cbe457047a0713bda4980fb5d4bc5bcaa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-07 08:09:56 +00:00
Tobias Hunger
527484bba9 QtVersion: Allow to override ABIs via SDKtool
Allow for overriding the ABIs detected for a Qt version from the
sdktool.

Leave the default at "auto-detect ABI".

Change-Id: Ibe2625b0a321a9541512d36a91aa2e42611a959b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-26 08:19:33 +00:00
Tobias Hunger
4ef01c961e app_version.h: Make IDE name configurable
Change-Id: I993f452c8d09cf89e9a2958fc8e36b7d2c17ee6f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-05 10:19:48 +00:00
Tobias Hunger
1b4321279f Update License according to agreement with Free Qt Foundation
* Update files in src/share* and src/tools

Change-Id: I78aa5d4a1d76212964e467de7676c1fcb2b777d6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:48:57 +00:00
Tobias Hunger
cc817d508f SDKtool: Make sure to use '/' as path separator
All internal paths in Qt Creator are using '/' as path separator.
Make sure to normalize paths set via the SDKtool to that convention.

Change-Id: If7ef250d49686a0f60d08516b718eb7c84a059ef
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-01-19 15:15:57 +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
Orgad Shaneh
382b1d43eb SdkTool: Use Qt Creator doctypes
Simplify filename conversion while at it

Change-Id: I0a7473aa42626a04214887f1cc82abe536233a78
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-07-08 12:44:16 +02:00
Rainer Keller
07f7dd9c14 SDKtool: Check for existing objects when creating kits
Check for existing Qt versions, toolchains and devices if
those ids are given.

Change-Id: I0447d55e01cc40e43669ba7999126b0260974c0b
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-03-04 17:29:31 +01:00
Tobias Hunger
fd2c2df87c SDKtool: Rename findValues method to findValue
It only searches for one value.

Change-Id: If780de3a919c41a03c9c0a978688fd1ea0411eb9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-20 14:37:30 +01: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
Tobias Hunger
85997b0bc1 SDKtool: Consistently use const char X[] for constants in .cpp files
Change-Id: Iee70ddb526a1751120be40bfd8d2ae01b27b80b8
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-29 18:11:13 +01:00
Kai Koehne
108899ef8f Don't return negative numbers in sdktool
Negative return values are interpreted as 'process crashed' on
Windows: QTBUG-28735 . This in turn means the installer framework
always shows an error dialog.

By using positive numbers even for error conditions the installer
can decide to ignore certain errors instead.

Change-Id: Ib5cdd461372ac13fe417feb6ff43a7424c159f68
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 11:33:32 +02:00
Tobias Hunger
a304fb45fc SDKtool: Fix a warning in test code
Change-Id: I5510295ec0dd631031402ca681b4275f1b4adb83
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-18 22:19:39 +02:00
Eike Ziller
ef5d3796d5 Merge remote-tracking branch 'origin/2.7' into 2.8 2013-05-23 07:25:34 +02:00
Daniel Teske
4bb73adad6 sdktool: Add operations: Fix adding to a empty map, check the right map
Change-Id: Iddcf85d3a19bed28baa9bd4c5f964c370f8c9c42
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-17 12:33:58 +02:00
Friedemann Kleint
056e8aa4c2 Fix some Krazy warnings about non-const ref iterator.
Change-Id: I1c78f5f5a7174002cd25bea109d5fe795530cdb5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-11 17:31:07 +01:00
Tobias Hunger
fcb1693e83 SDKtool: Fix removal of toolchains
Change-Id: If66745582adcae1dbdb101cecc426280c1be182f
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-02-22 15:49:02 +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
Oswald Buddenhagen
f1cec4629e Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/libs/utils/tooltip/tips.cpp
	src/plugins/coreplugin/versiondialog.cpp
	src/plugins/projectexplorer/kitinformationconfigwidget.cpp
	src/plugins/qnx/blackberryapplicationrunner.cpp
	src/plugins/qnx/blackberrydeployconfiguration.cpp
	src/plugins/qnx/blackberrydeployconfiguration.h
	src/plugins/qt4projectmanager/qmakekitconfigwidget.cpp

Change-Id: I7886ec971942d9e0a9da237dcf4ceb1687abd71b
2013-01-29 15:52:36 +01:00
Tobias Hunger
4a31b65f91 sdktool: Fix addQt test
Change-Id: I68e5bbcae8f1e6cf4906497d3c2475818e5eda8f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-22 16:21:53 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01:00
Tobias Hunger
af2b39699a SDKtool: Fix autodetection sources of Qt versions
Make sure to use autodetection sources (--id) in sdktool that
are actually expected by Creator. Do so by prepending the necessary
magic.

This makes sure that creator will actually remove the SDK Qt versions
again once they get removed by SDKtool.

Task-number: QTCREATORBUG-8235
Change-Id: I8dde1ab1ae192c8f79de9fb9104461e7435237ec
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2012-11-20 17:01:10 +01:00
Tobias Hunger
c6d97aea54 sdktool: Make sure to put a sane qmake path into qtversions.xml
Task-number: QTBUG-27980

Change-Id: Ic339384422da425a35d1f0180603605def71c5f3
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-11-20 15:49:34 +01:00
Andreas Holzammer
1c5c009b9c add verbose messages to sdktool addQt
Change-Id: Icfcfaa01b13b1e7ed363f5cbaf7d1b43494adeb3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-11 16:02:21 +02:00
Tobias Hunger
ae2a600af8 sdktool: Fix type of device type and the unit tests
Change-Id: I64b817c0bd6c454d4f9cb423720c8baed8490fea
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-10 10:35:41 +02: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
Friedemann Kleint
6dad4586c6 sdktool: Fix MSVC warnings about comparison (!<int> == number).
Change-Id: I74be70ed1693160acab5c4be5da09d004bf0801c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-09-28 09:59:28 +02:00
Tobias Hunger
471f44aae3 SDKtool: Always write settings to the place creator expects them
Simplify the .pro-file while at it and add rpath.

Change-Id: Ia111e76093c6c375d04fca51d81ac87a267b0121
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-09-25 17:16:33 +02:00
Tobias Hunger
4f36ad63ce Add sdktool
Add a tool to ease configuration of Qt versions, tool chains
and kits with Qt Creator for the SDK and similar systems.

Change-Id: I9727dd25ea359a935ea494b035a59411eb3529b8
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2012-09-21 17:07:10 +02:00