Calling <Module>::Tr::tr() is preferred over
QCoreApplication::translate("::<Module>", "..."). This changes
occurrences in .cpp files.
Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1
Reviewed-by: hjk <hjk@qt.io>
By re-routing through device hooks. Now basically a FilePath
is sufficient as a handle.
Change-Id: I0ee43c35096ada12114d50476d5156a6c1de1e70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
The code blindly assumed the current locale's codec when reading files,
potentially breaking the content.
Fixes: QTCREATORBUG-28164
Change-Id: I390b3d4e615e5ca853faef2c6159988cc6246337
Reviewed-by: David Schulz <david.schulz@qt.io>
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).
Change-Id: Idfc8a7e255b4a0527f4651d6f9e5334e95b4351f
Reviewed-by: David Schulz <david.schulz@qt.io>
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>
Since it's not possible to use directly ICore::settings()
inside Utils lib, make setSettings() a static member.
This simplifies the API of other static methods.
Set the settings just once now, inside main().
Change-Id: I2bcc58d4d29b5aba4a1a21a98a9f4245b24b530f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Instead of using AppleScript. Available since at least macOS 10.13.
Change-Id: I088efc211189aab75480b3ea02f90cc235724bef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
And add a shortcut for editor manager for that, similar to "Show in
Finder/Explorer" and "Open Terminal Here".
Change-Id: Iddc287106e194c856501bf38e53b3c738a2aed1a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
That opens the selected file/path in the file system view.
Behaves the same as the navigation view shortcut + syncing with the
selected file.
It would be nice to have that at other places too, but this requires
moving the file system view to Core plugin first.
Change-Id: Icc6d1041156d97f5d2bda43a3501758f06fe80aa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Only used once, and there's an easily accessible removeFiles(FilePaths)
at hand.
Change-Id: I939298515f27cd34d08afa327ebe198bc30851a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
to ProcessArgs and rename the files to commandline.*.
fileutils was a strange place for CommandLine, and this
reduces the dependencies needed for sdktool.
Change-Id: I9d7e8ffe8a3560f5d12934457b086f9446976883
Reviewed-by: hjk <hjk@qt.io>
There's not much interaction between ProcessArgs and QtcProcess
and both .cpp are still quite big, with non-trivial bits.
Change-Id: Id84202f6c34057bf87cc8f27fbb45f78f105e9a5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface
So move these items out of QtcProcess, later potentially to a separate
file pair.
Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Bring messages pane to front when triggering an external tool or
command, write output silently and flash when tool finishes or fails.
Also bring pane to front if file renaming or removing fails (this should
happen only as a direct consequence of the user choosing this action).
Task-number: QTCREATORBUG-24430
Change-Id: Ib47431bd57a9c05bfdbfb03ad4c7cd38bdf3ddd1
Reviewed-by: hjk <hjk@qt.io>
In Qt 5.15 QProcess::startDetached(const QString &command) overload
got deprecated, and in Qt 6 it has disappeared.
We substiture it by setting explicitly the program and
arguments on browserProc. In order to properly separate
the command into program name and arguments we use
Utils::QtcProcess::splitArgs(). We also handle the case
when a path to file browser was not specified, and the case
when starting a file browser failed and the error was empty.
Task-number: QTCREATORBUG-24098
Change-Id: Ie9c9581b303407ddc5c64264576ad39ec0894bdb
Reviewed-by: hjk <hjk@qt.io>
Gone in Qt6. Write into a string buffer and bulk convert and write that
into the file with QTextCodec.
Task-number: QTCREATORBUG-24098
Change-Id: I266e90e166a22c8b34b2963458af1cc4f5d2df82
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... and use it to improve the user experience when removing several files
at once from a project.
Fixes: QTCREATORBUG-24385
Change-Id: I8e8c39ee9dc0046f1715a5143a7649fab06e5ad8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.
Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
Most often, a terminal with system environment is needed.
Provide it as direct context menu entry, and leave the
additional entries for build and run environment (which
are probably more seldom used) as sub-menu as before,
but rename it to "Open Terminal with >".
Change-Id: I148395ca1e62eafff8844ba91db269a12b053de9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
qt 5.8 made QProcess::startDetached()'s behavior consistent with
start(), which means it won't open a console any more. however, qtc
relied on this (unspecified) behavior.
the correct solution is to add a static function startTerminalEmulator()
to ConsoleProcess, which already has most of the necessary code anyway.
Task-number: QTCREATORBUG-17439
Change-Id: Icf04666869ce6593555302a54c49331a29846a99
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
It was too crowded to add anything to it. Split it into "interface" and
"system" related pages.
Change-Id: I2aa7984de4d672ca000e991b0cfb32a3f706c988
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
PageIds are supposed to be unique, so the CategoryId can be determined
from the PageId. Look for PageIds in the already expanded categories
first before searching through expensive categories.
Change-Id: I006beb0df6183453163ac1810fe59a306a0f52b1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Qt 5.3 is the minimum requirement these days. Remove all fallback code
from sources and project files.
Change-Id: If6188a471197acadda4d6baee71804ba1a8026c6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Otherwise the options dialog might appear behind the current "dialog"
(for example the "new" wizards).
Also, take ICore::dialogParent as default.
Change-Id: I4578e269db5763842a942549a45ec8cdd6b28b5d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>