Commit Graph

41 Commits

Author SHA1 Message Date
Jarek Kobus
afc67468e6 Process: Get rid of setTimeoutS()
Add an extra arg to runBlocking() function instead.
Use std::chrono::seconds for timeout.

Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:27:51 +00:00
Jarek Kobus
3a252ef86c PluginInstallWizard: Reuse TaskTreeRunner
Change-Id: I66e7909d1ec0ce04ca250f4bda42bf9b2630966f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-19 08:37:22 +00:00
Jarek Kobus
fbe359308d TaskTree: Unify done / errorOccurred signals
Get rid of TaskTree::errorOccurred signal. Provide additional
DoneResult arg for done signal.

Task-number: QTCREATORBUG-29834
Change-Id: I31a3a0701a14246b01f65303a1295f014c855ecf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 14:07:52 +00:00
Jarek Kobus
b5f77f6d55 TaskTree: Get rid of unneeded done handlers' arguments
Task-number: QTCREATORBUG-29834
Change-Id: I236dec27a292a1b006b7001d01ce620960380de9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 11:51:50 +00:00
Jarek Kobus
6e6aa7102c TaskTree: Introduce CallDoneIf enum
Get rid of CustomTask c'tor taking 3 handlers.
If the done handler needs to be called only on
success or an error, add explicit 3rd arg of CallDoneIf type.

Task-number: QTCREATORBUG-29834
Change-Id: I10e55415587e6cac46620dd5177ad8269584583c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-07 11:51:25 +00:00
Ludovic Le Brun
26b2a755a8 Fix install .so plugins
Remove the period from the file extension .so because the completeSuffix function of the FilePath class does not return the first period of the extension.

Change-Id: Ifd850e54337c399d6440b6ad765c3b23df9ed330
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-20 10:08:34 +00:00
hjk
9679412a23 Replace QFile::exists by QFileInfo::exists
QFile::exists only calls QFileInfo::exists, so this saves one
function call per invocation.

Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-01 10:24:31 +00:00
Jarek Kobus
6bb8bbabd2 Utils: Rename archive.{cpp, h} -> unarchiver.{cpp, h}
Change-Id: I0c3fdb68a15a6ad7419405d2bef86d4e75537df5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-07-20 07:14:43 +00:00
Eike Ziller
dff9e1463b Reduce usage of app_version header
Most information is available via Q(Core|Gui)Application.
Add an AppInfo structure for the things that are not.

This avoids that the information ends up duplicated and
hardcoded in the plugins, which is not needed or desired.

Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-26 06:57:46 +00:00
Eike Ziller
6479785c20 Merge remote-tracking branch 'origin/11.0'
Change-Id: Icb3ed8a1aaf31e8201a61d04221bfcb23a78562a
2023-06-22 13:09:00 +02:00
Christian Stenger
f84d75402a Core: Fix compile
Amends 3e074a52c1.

Change-Id: I229a6db53d973168150f063edb7417117ed0dcee
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-06-20 11:49:20 +00:00
Jarek Kobus
3e074a52c1 PluginInstallWizard: Reuse TaskTree
Change-Id: I0e139627a9d4c3401bcf7727ef1e51b2de858b77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-20 07:19:21 +00:00
Alessandro Portale
e759ce310f Core: Use LayoutBuilder in PluginDialog
Change-Id: I06b07234727fc46a717af89febae43af1cb67b9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-06-02 12:46:40 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
Jarek Kobus
a3a5b8f806 Utils: Rename asynctask.{cpp,h} -> async.{cpp,h}
Follows AsyncTask -> Async rename.

Change-Id: I37f18368ab826c9960a24087b52f6691bb33f225
Reviewed-by: hjk <hjk@qt.io>
2023-05-03 13:24:20 +00:00
Jarek Kobus
7ab0fd56ae RunExtensions: Move onResultReady and onFinished into asynctask.h
Change-Id: I96dbf5b0253251224ae678172cd5fca12b34326a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 09:10:33 +00:00
Jarek Kobus
fad7bb9382 PluginInstallWizard: Use QtConcurrent invocation for async run
Change-Id: I82fad61c765af283e5d5cee4d7262e13a6843a84
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-09 09:17:11 +00:00
hjk
4b9aaf6ca1 ExtensionSystem: Remove the IPlugin back pointer to pluginspec
The price of having to loop in two places seems small compared
to cleaner relations between the classes.

There's a new hack in the helpmanager to make sure we aren't
looping to often. The hack wouldn't be needed if the (odd(?))
check there weren't there.

Change-Id: Ifed50213b2de8feedfb45c185808d163c00c19ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 10:23:33 +00:00
hjk
015b1ee53c Core: Tr::tr
Change-Id: I0064814b0689f0f65072d2b0f60e26162587fd54
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-17 14:34:16 +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
hjk
1567d24980 Utils: Replace PathChooser::{fileP,p}athChanged signals
... by a new PathChooser::textChanged signal.

They were both emitted in reaction to the underlying line edit's
textChanged() signal.

Use 'textChanged()' as name to mimic/match the Qt side. This also
makes it more clear on the user code side, when this happens.

Some textChanged() consumers should probably use editingFinished()
instead, but that's left for later changes.

Change-Id: Ib07347f616cbf1c5d09bc2f8671ca860d185d1f9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-06 05:01:51 +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
Jarek Kobus
ed94e0c066 Archive: Avoid calling blocking stopProcess
Make Archive constructor public.
Make the caller responsible for deleting the Archive object.

Don't automatially run the unarchive process when constructing
Archive object. Provide a start() method, to be called after
the caller has connected to Archive signals.

Add Archive::isValid() method.

Remove Archive::unarchive() gui overload, as it's unused.

Make sure we don't leak the Archive object in
AndroidSdkDownloader.

Change-Id: Idf67262554cdfef50aef4a2234b6a5089110f9a2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-25 12:49:19 +00:00
hjk
2ab2d96753 Utils: Use FilePath in copy helpers
Change-Id: I81b367a5851c0fbcdf45c63c5536c206845a8337
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-10 07:19:10 +00:00
hjk
a58dd22f2d Utils: Use FilePath in TemporaryDirectory API
This helps to lower impedance in the using code.

Even though TemporaryDirectory will very likely always stay on the local
host, this is one of the entry points into path related string
manipulation
that we want to base on FilePath nowadays.

Change-Id: I302016b8d65e54df94296659a54a93935d9e4627
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 05:05:12 +00:00
hjk
430e81facd All: Replace most SynchronousProcess by QtcProcess
Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 07:55:31 +00:00
David Schulz
aa8d2dc2d1 Utils: add FilePath::(complete)suffix
The same as FilePath::(complete)baseName avoid some toFileInfo.

Change-Id: Id1901ce2a4bef675215a9e020280df1c846df405
Reviewed-by: hjk <hjk@qt.io>
2021-06-04 09:32:52 +00:00
hjk
90ad902486 Utils: Remove CommandLine argument from QtcProcess::run{,Blocking}
Makes run() more similar to what start() looks like.

Also add some asserts to make sure run() and related functions are
only called on SyncronousProcesses, as these are currently the only
ones where this works.

Change-Id: Idee6076c3f40a484db5c17f5bb348698cc83d220
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-19 13:01:51 +00:00
hjk
c23cdd9262 Utils: Merge {synchronous,qtc}process.{h,cpp} file pairs
Mechanical to prepare merging the actual classes.
Adapting #includes.

Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-10 09:47:51 +00:00
Eike Ziller
768d4321f9 Merge remote-tracking branch 'origin/4.14'
Change-Id: I214b8d59e8ff7fe0511cd6116ec7725ddc4376ee
2021-02-18 09:26:22 +01:00
Eike Ziller
27300c66fe Improve plugin install wizard on macOS
Downloaded files get a quarantine flag on macOS, which prevents loading
them as a plugin in Qt Creator. Remove the quarantine flag when copying
the plugin.

Change-Id: I3edef3ddfbab299be750e728a9fac0536634ba1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-15 14:10:17 +00:00
Eike Ziller
2197eeb4aa Fix installation directory in plugin install wizard
Correctly initialize the bool variable that decides where the plugin is
installed.
Fix creation of installation directory: QDir::cdUp does not do anything
for directories that do not exist.

Change-Id: I5ee559a663380f293046eded7a2c3efbb1023776
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-15 08:30:47 +00:00
Eike Ziller
5ca70bdcb3 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea84f23cf394de13e99a9ed777c8c113e4eff473
2020-11-19 15:38:13 +01:00
Alessandro Portale
871c8e3ffd Don't access static functions via Utils::HostOsInfo instance
Change-Id: Ic45b8f324cb7c6a4691545fc8d668eed69dfeced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-18 22:08:42 +00:00
Alessandro Portale
30aec82285 Add missing "final" to unexported/unshared classes
Change-Id: I84d5fc39d7ef5588a20545854d0cfd0b993db090
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 15:40:29 +00:00
Eike Ziller
f88deb5b70 Plugin install wizard: Search in subdirectories of archive too
Default install structure of a plugin is in a subdirectory like in a Qt
Creator installation.

Change-Id: Ia4e5a08eb9fbe4b1586ff5d406cae1883e7dbd59
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-18 11:03:02 +00:00
Eike Ziller
d67ab36c6f Plugin install: Check if archive contains a usable plugin
Checks if there is a library file which is a Qt Creator plugin
that is compatible with the version of Qt Creator that is running.

Change-Id: Ic5284e3803c45b8e2ef0d30afccb1680fabf43f3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-02 06:59:47 +00:00
Eike Ziller
1c30c868f1 Plugin install: Fix state when going back from archive check
We can ignore the Archive result when the user goes back, and we need to
reset the warning label style when she checks another archive.

Change-Id: I76ce07d1a46875ac72696bcf7ab6c804d63b906b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-01 11:44:35 +00:00
Eike Ziller
30b6bbfb6b Plugin Wizard: Investigate archive before installing
So far that only moves unarchiving and the check if that succeeds to
within the wizard.
To be extended with additional checks for the archive content's sanity.

Change-Id: I6798937826fbe9cb584d83a920e67b6cfcc119ed
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-17 06:50:48 +00:00
Eike Ziller
4613199548 Extract plugin install wizard
It will become more complicated, so pull it into its own files.

Change-Id: If362f0775cc9d97a3c715c046d32d6a20c30a1f9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-05 06:15:15 +00:00