Merge "Merge remote-tracking branch 'origin/14.0'"

This commit is contained in:
The Qt Project
2024-08-07 09:44:03 +00:00
43 changed files with 311 additions and 81 deletions

View File

@@ -7,7 +7,7 @@ on:
- 'doc/**'
env:
QT_VERSION: 6.7.1
QT_VERSION: 6.7.2
MACOS_DEPLOYMENT_TARGET: 11.0
CLANG_VERSION: 18.1.7
ELFUTILS_VERSION: 0.175

View File

@@ -10,7 +10,7 @@ instructions:
variableValue: https://ci-files02-hki.ci.qt.io/packages/jenkins/qtcreator_libclang/libclang-release_18.1.7-based
- type: EnvironmentVariable
variableName: QTC_QT_BASE_URL
variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/archive/qt/6.7/6.7.1-released/Qt"
variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/archive/qt/6.7/6.7.2-released/Qt"
- type: EnvironmentVariable
variableName: QTC_QT_MODULES
variableValue: "qt5compat qtbase qtdeclarative qtimageformats qtquick3d qtquicktimeline qtserialport qtshadertools qtsvg qttools qttranslations qtwebengine"

92
dist/changelog/changes-14.0.1.md vendored Normal file
View File

@@ -0,0 +1,92 @@
Qt Creator 14.0.1
=================
Qt Creator version 14.0.1 contains bug fixes.
The most important changes are listed in this document. For a complete list of
changes, see the Git log for the Qt Creator sources that you can check out from
the public Git repository. For example:
<https://code.qt.io/cgit/qt-creator/qt-creator.git/log/?id=v14.0.0..v14.0.1>
General
-------
* Fixed wrong colors when using a light theme on a dark system
([QTCREATORBUG-31226](https://bugreports.qt.io/browse/QTCREATORBUG-31226))
Editing
-------
* Fixed a crash when selecting a context menu item for an editor that was
closed in the meantime
([QTCREATORBUG-31232](https://bugreports.qt.io/browse/QTCREATORBUG-31232))
### C++
* Fixed a crash in the type hierarchy builder
([QTCREATORBUG-31318](https://bugreports.qt.io/browse/QTCREATORBUG-31318))
* Fixed the highlighting of non-plain character literals
([QTCREATORBUG-31342](https://bugreports.qt.io/browse/QTCREATORBUG-31342))
### QML
* Fixed that context help could show help from the wrong module
([QTCREATORBUG-31280](https://bugreports.qt.io/browse/QTCREATORBUG-31280))
### FakeVim
* Fixed that invalid values could be set for the tabstop size
([QTCREATORBUG-28082](https://bugreports.qt.io/browse/QTCREATORBUG-28082))
Projects
--------
### CMake
* Fixed the application of changes to the `Initial Arguments`
([QTCREATORBUG-31320](https://bugreports.qt.io/browse/QTCREATORBUG-31320))
Debugging
---------
### C++
* Fixed pretty printing for Qt 4
([QTCREATORBUG-31355](https://bugreports.qt.io/browse/QTCREATORBUG-31355))
Analyzer
--------
### Axivion
* Fixed a crash when creating links from the issues table to column data
### Valgrind
* Fixed missing error kinds for newer Valgrind versions in the parser
([QTCREATORBUG-31376](https://bugreports.qt.io/browse/QTCREATORBUG-31376))
Platforms
---------
### Docker
* Fixed a crash when adding a Docker device while an application is running
on a Docker device
([QTCREATORBUG-31364](https://bugreports.qt.io/browse/QTCREATORBUG-31364))
Credits for these changes go to:
--------------------------------
Alessandro Portale
Alexandre Laurent
André Pönitz
Andrew Shark
Christian Kandeler
Christian Stenger
Cristian Adam
Eike Ziller
Leena Miettinen
Marco Bubke
Marcus Tillmanns
Mehdi Salem

View File

@@ -5,10 +5,9 @@ Qt Creator version 13 contains bug fixes and new features.
The most important changes are listed in this document. For a complete list of
changes, see the Git log for the Qt Creator sources that you can check out from
the public Git repository. For example:
the public Git repository or view online at
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline origin/12.0..v13.0.0
<https://code.qt.io/cgit/qt-creator/qt-creator.git/log/?id=12.0..v13.0.0>
New plugins
-----------
@@ -46,6 +45,8 @@ Editing
### SCXML
### FakeVim
### Binary Files
Projects
@@ -83,6 +84,8 @@ Analyzer
### CTF Visualizer
### Valgrind
### Cppcheck
Terminal

View File

@@ -170,7 +170,7 @@
\image qtcreator-build-cmake-output.png {CMake output in Projects mode}
To clear the search results, select the \inlineimage icons/clean_pane_small.png
To clear the output from CMake, select the \inlineimage icons/clean_pane_small.png
(\uicontrol Clear) button.
You can enter a string in the \uicontrol Filter field to filter output.

View File

@@ -8,7 +8,7 @@
// **********************************************************************
/*!
\previouspage creator-testing.html
\previouspage creator-configuring-projects.html
\page creator-debugging.html
\nextpage creator-debugger-engines.html

View File

@@ -469,7 +469,7 @@
*/
/*!
\page creator-how-to.html
\page creator-how-to-insert-multiple-cursors.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-edit

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-run-settings-\B2Q.html
\page creator-run-settings-b2qt.html
\previouspage creator-reference.html
\ingroup creator-reference-run-configurations

View File

@@ -2,9 +2,8 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\previouspage creator-project-creating.html
\page creator-how-to-select-build-system.html
\nextpage creator-file-creating.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-projects-create

View File

@@ -40,6 +40,24 @@ set(resource_files
debugger/stdtypes.py
debugger/utils.py
debugger/loadorder.txt
debugger-with-python2/qttypes.py
debugger-with-python2/personaltypes.py
debugger-with-python2/android_stdtypes.py
debugger-with-python2/README.txt
debugger-with-python2/gdbbridge.py
debugger-with-python2/cdbbridge.py
debugger-with-python2/lldbbridge.py
debugger-with-python2/misctypes.py
debugger-with-python2/opencvtypes.py
debugger-with-python2/libcpp_stdtypes.py
debugger-with-python2/creatortypes.py
debugger-with-python2/stdtypes.py
debugger-with-python2/gdbtracepoint.py
debugger-with-python2/utils.py
debugger-with-python2/boosttypes.py
debugger-with-python2/dumper.py
debugger-with-python2/pdbbridge.py
)
# copy resource directories during build

View File

@@ -288,8 +288,6 @@ class DumperBase():
# A hack to cover most of the changes from Qt 5 to 6
if version == 0x60000 and self.qtversionAtLeast6 is not None:
return self.qtversionAtLeast6
if version == 0x50000: # FIXME: This drops unknown 4.x for now
return True
return self.qtVersion() >= version
def qtVersionPing(self, typeid, size_for_qt5=-1):
@@ -496,7 +494,7 @@ class DumperBase():
native_type = self.lookupNativeType(typename)
if native_type is None:
#sCANNOT DETERMINE SIZE FOR TYelf.dump_location()
self.dump_location()
#self.dump_location()
self.warn("TYPEIDS: %s" % self.typeid_cache)
self.warn("COULD NOT FIND TYPE '%s'" % typename)
return None
@@ -1070,7 +1068,7 @@ class DumperBase():
def check(self, exp):
if not exp:
self.warn('Check failed: %s' % exp)
self.dump_location()
#self.dump_location()
raise RuntimeError('Check failed: %s' % exp)
def check_typeid(self, typeid):
@@ -3716,7 +3714,7 @@ typename))
return size, typeid
typeobj = self.lookupType(typename)
self.warn("LOOKUP FIELD TYPE: %s TYPEOBJ: %s" % (typename, typeobj))
#self.warn("LOOKUP FIELD TYPE: %s TYPEOBJ: %s" % (typename, typeobj))
if typeobj is not None:
typeid = typeobj.typeid
size = self.type_size(typeid)

View File

@@ -5,7 +5,7 @@ PaletteWindowText=ff000000
PaletteWindowTextDisabled=PaletteTextDisabled
PaletteBase=PaletteWindow
PaletteBaseDisabled=PaletteWindowDisabled
PaletteAlternateBase=ff515151
PaletteAlternateBase=fff7f7f7
;PaletteAlternateBaseDisabled
PaletteToolTipBase=PaletteDark
;PaletteToolTipBaseDisabled

View File

@@ -11548,6 +11548,14 @@ Cela ne peut être annulé.</translation>
<source>Cannot parse &quot;%1&quot;.</source>
<translation>Impossible d&apos;analyser «&#xa0;%1&#xa0;».</translation>
</message>
<message>
<source>Android package installation finished with success.</source>
<translation>Installation du paquet Android terminée avec succès.</translation>
</message>
<message>
<source>Android package installation failed.</source>
<translation>Échec lors de l&apos;installation du paquet Android.</translation>
</message>
<message>
<source>Android package installation failed.
%1</source>
@@ -12873,7 +12881,7 @@ Exécutable&#xa0;: %2</translation>
</message>
<message>
<source>Skip throwing assertions</source>
<translation>Ignore les assertions</translation>
<translation>Ignorer les assertions</translation>
</message>
<message>
<source>Skips all assertions that test for thrown exceptions.</source>
@@ -13024,7 +13032,7 @@ Exécutable&#xa0;: %2</translation>
</message>
<message>
<source>Run disabled tests</source>
<translation>Exécute les tests désactivés</translation>
<translation>Exécuter les tests désactivés</translation>
</message>
<message>
<source>Executes disabled tests when performing a test run.</source>
@@ -13045,7 +13053,7 @@ Exécutable&#xa0;: %2</translation>
<message>
<source>Throw on failure</source>
<translatorcomment>GTest option gtest_throw_on_failure</translatorcomment>
<translation>Envoi d&apos;une exception en cas d&apos;échec</translation>
<translation>Envoyer une exception en cas d&apos;échec</translation>
</message>
<message>
<source>Turns assertion failures into C++ exceptions.</source>
@@ -13220,7 +13228,7 @@ Voir la documentation de Google Test pour plus d&apos;informations sur les filtr
</message>
<message>
<source>Disable crash handler while debugging</source>
<translation>Désactive le gestionnaire de plantage lors du débogage</translation>
<translation>Désactiver le gestionnaire de plantage lors du débogage</translation>
</message>
<message>
<source>Enables interrupting tests on assertions.</source>
@@ -13228,7 +13236,7 @@ Voir la documentation de Google Test pour plus d&apos;informations sur les filtr
</message>
<message>
<source>Use XML output</source>
<translation>Utilise la sortie XML</translation>
<translation>Utiliser la sortie XML</translation>
</message>
<message>
<source>XML output is recommended, because it avoids parsing issues, while plain text is more human readable.&lt;p&gt;Warning: Plain text misses some information, such as duration.</source>
@@ -13703,7 +13711,7 @@ Cela peut provoquer des problèmes lors de l&apos;exécution.
</message>
<message>
<source>Automatically scroll results</source>
<translation>Défile automatiquement les résultats</translation>
<translation>Faire défiler automatiquement les résultats</translation>
</message>
<message>
<source>Number of worker threads used when scanning for tests.</source>
@@ -13723,7 +13731,7 @@ Cela peut provoquer des problèmes lors de l&apos;exécution.
</message>
<message>
<source>Group results by application</source>
<translation>Regrouppe les résultats par application</translation>
<translation>Regrouper les résultats par application</translation>
</message>
<message>
<source>Process arguments</source>
@@ -13781,7 +13789,7 @@ Avertissement&#xa0;: fonctionnalité expérimentale pouvant entraîner un échec
</message>
<message>
<source>Automatically run</source>
<translation>Exécute automatiquement</translation>
<translation>Exécuter automatiquement</translation>
</message>
<message>
<source>Active Test Frameworks</source>

View File

@@ -14,6 +14,7 @@ Product {
"android/**/*",
"cplusplus/**/*",
"debugger/**/*",
"debugger-with-python2/**/*",
"designer/**/*",
"glsl/**/*",
"jsonschemas/**/*",
@@ -36,6 +37,7 @@ Product {
"qml-type-descriptions/qbs-bundle.json",
"qml-type-descriptions/qbs.qmltypes",
"debugger/**/__pycache__/*",
"debugger-with-python2/**/__pycache__/*",
]
}

View File

@@ -30,7 +30,7 @@
*/
/*!
\enum IPlugin::ShutdownFlag
\enum ExtensionSystem::IPlugin::ShutdownFlag
This enum type holds whether the plugin is shut down synchronously or
asynchronously.

View File

@@ -629,19 +629,19 @@ private:
*/
/*!
\typealias CustomTask::Task
\typealias Tasking::CustomTask::Task
Type alias for the task type associated with the custom task's \c Adapter.
*/
/*!
\typealias CustomTask::Deleter
\typealias Tasking::CustomTask::Deleter
Type alias for the task's type deleter associated with the custom task's \c Adapter.
*/
/*!
\typealias CustomTask::TaskSetupHandler
\typealias Tasking::CustomTask::TaskSetupHandler
Type alias for \c std::function<SetupResult(Task &)>.
@@ -676,7 +676,7 @@ private:
*/
/*!
\typealias CustomTask::TaskDoneHandler
\typealias Tasking::CustomTask::TaskDoneHandler
Type alias for \c std::function<DoneResult(const Task &, DoneWith)> or DoneResult.
@@ -865,7 +865,7 @@ private:
*/
/*!
\variable nullItem
\variable Tasking::nullItem
A convenient global group's element indicating a no-op item.
@@ -883,7 +883,7 @@ private:
*/
/*!
\variable successItem
\variable Tasking::successItem
A convenient global executable element containing an empty, successful, synchronous task.
@@ -912,7 +912,7 @@ private:
*/
/*!
\variable errorItem
\variable Tasking::errorItem
A convenient global executable element containing an empty, erroneous, synchronous task.
@@ -941,7 +941,7 @@ private:
*/
/*!
\variable sequential
\variable Tasking::sequential
A convenient global group's element describing the sequential execution mode.
This is the default execution mode of the Group element.
@@ -956,7 +956,7 @@ private:
*/
/*!
\variable parallel
\variable Tasking::parallel
A convenient global group's element describing the parallel execution mode.
All the direct child tasks of a group are started after the group is started,
@@ -967,7 +967,7 @@ private:
*/
/*!
\variable parallelIdealThreadCountLimit
\variable Tasking::parallelIdealThreadCountLimit
A convenient global group's element describing the parallel execution mode with a limited
number of tasks running simultanously. The limit is equal to the ideal number of threads
excluding the calling thread.
@@ -981,39 +981,39 @@ private:
*/
/*!
\variable stopOnError
\variable Tasking::stopOnError
A convenient global group's element describing the StopOnError workflow policy.
This is the default workflow policy of the Group element.
*/
/*!
\variable continueOnError
\variable Tasking::continueOnError
A convenient global group's element describing the ContinueOnError workflow policy.
*/
/*!
\variable stopOnSuccess
\variable Tasking::stopOnSuccess
A convenient global group's element describing the StopOnSuccess workflow policy.
*/
/*!
\variable continueOnSuccess
\variable Tasking::continueOnSuccess
A convenient global group's element describing the ContinueOnSuccess workflow policy.
*/
/*!
\variable stopOnSuccessOrError
\variable Tasking::stopOnSuccessOrError
A convenient global group's element describing the StopOnSuccessOrError workflow policy.
*/
/*!
\variable finishAllAndSuccess
\variable Tasking::finishAllAndSuccess
A convenient global group's element describing the FinishAllAndSuccess workflow policy.
*/
/*!
\variable finishAllAndError
\variable Tasking::finishAllAndError
A convenient global group's element describing the FinishAllAndError workflow policy.
*/
@@ -1104,7 +1104,7 @@ private:
*/
/*!
\typealias GroupItem::GroupSetupHandler
\typealias Tasking::GroupItem::GroupSetupHandler
Type alias for \c std::function<SetupResult()>.
@@ -1134,7 +1134,7 @@ private:
*/
/*!
\typealias GroupItem::GroupDoneHandler
\typealias Tasking::GroupItem::GroupDoneHandler
Type alias for \c std::function<DoneResult(DoneWith)> or DoneResult.
@@ -3607,13 +3607,13 @@ void TimeoutTaskAdapter::start()
}
/*!
\typealias TaskTreeTask
\typealias Tasking::TaskTreeTask
Type alias for the CustomTask, to be used inside recipes, associated with the TaskTree task.
*/
/*!
\typealias TimeoutTask
\typealias Tasking::TimeoutTask
Type alias for the CustomTask, to be used inside recipes, associated with the
\c std::chrono::milliseconds type. \c std::chrono::milliseconds is used to set up the

View File

@@ -93,12 +93,12 @@ private:
*/
/*!
\typedef QrcParser::Ptr
\typedef Utils::QrcParser::Ptr
Represents pointers.
*/
/*!
\typedef QrcParser::ConstPtr
\typedef Utils::QrcParser::ConstPtr
Represents constant pointers.
*/

View File

@@ -216,9 +216,9 @@ TextFileFormat::ReadResult readTextFile(const FilePath &filePath, const QTextCod
Reads a text file from \a filePath into a list of strings, \a plainTextList
using \a defaultCodec and text file format \a format.
Returns whether decoding was possible without errors. If errors occur,
returns an error message, \a errorString and a sample error,
\a decodingErrorSample.
Returns whether decoding was possible without errors. If an errors occur
\a errorString is set to the error message, and \a decodingErrorSample is
set to a snippet that failed to decode.
*/
TextFileFormat::ReadResult
@@ -239,8 +239,9 @@ TextFileFormat::ReadResult
Reads a text file from \a filePath into a string, \a plainText using
\a defaultCodec and text file format \a format.
Returns whether decoding was possible without errors.
Returns whether decoding was possible without errors. If an errors occur
\a errorString is set to the error message, and \a decodingErrorSample is
set to a snippet that failed to decode.
*/
TextFileFormat::ReadResult

View File

@@ -514,7 +514,7 @@ static QList<LinkWithColumns> linksForIssue(const std::map<QString, Dto::Any> &i
const QString &line) {
QList<int> columns;
auto it = issueRow.find(path);
if (it != end) {
if (it != end && !it->second.isNull()) {
Link link{ FilePath::fromUserInput(it->second.getString()) };
columns.append(findColumn(it->first));
it = issueRow.find(line);

View File

@@ -617,10 +617,10 @@ void CMakeBuildSettingsWidget::reconfigureWithInitialParameters()
if (reply != QMessageBox::Yes)
return;
m_buildConfig->cmakeBuildSystem()->clearCMakeCache();
updateInitialCMakeArguments();
m_buildConfig->cmakeBuildSystem()->clearCMakeCache();
if (ProjectExplorerPlugin::saveModifiedFiles())
m_buildConfig->cmakeBuildSystem()->runCMake();
}

View File

@@ -1240,6 +1240,11 @@ void CMakeBuildSystem::clearCMakeCache()
path.removeRecursively();
emit configurationCleared();
}
void CMakeBuildSystem::disableCMakeBuildMenuActions()
{
emitParsingStarted();
emitParsingFinished(false);
}

View File

@@ -77,6 +77,7 @@ public:
bool persistCMakeState();
void clearCMakeCache();
void disableCMakeBuildMenuActions();
// Context menu actions:
void buildCMakeTarget(const QString &buildTarget);

View File

@@ -263,6 +263,7 @@ void CMakeManager::clearCMakeCache(BuildSystem *buildSystem)
QTC_ASSERT(cmakeBuildSystem, return);
cmakeBuildSystem->clearCMakeCache();
cmakeBuildSystem->disableCMakeBuildMenuActions();
}
void CMakeManager::runCMake(BuildSystem *buildSystem)

View File

@@ -129,7 +129,7 @@ using namespace Internal;
* name.
*/
/*! \enum ReadOnlyFilesDialog::ReadOnlyResult
/*! \enum Core::ReadOnlyFilesDialog::ReadOnlyResult
This enum holds the operations that are allowed to make the file writable.
\value RO_Cancel

View File

@@ -208,7 +208,7 @@ void EditorManagerPlaceHolder::showEvent(QShowEvent *)
*/
/*!
\enum EditorManager::OpenEditorFlag
\enum Core::EditorManager::OpenEditorFlag
This enum specifies settings for opening a file in an editor.

View File

@@ -72,7 +72,7 @@
*/
/*!
\enum IDocument::OpenResult
\enum Core::IDocument::OpenResult
The OpenResult enum describes whether a file was successfully opened.
@@ -87,13 +87,13 @@
*/
/*!
\enum IDocument::ReloadSetting
\enum Core::IDocument::ReloadSetting
\internal
*/
/*!
\enum IDocument::ChangeTrigger
\enum Core::IDocument::ChangeTrigger
The ChangeTrigger enum describes whether a file was changed from \QC
internally or from the outside.
@@ -107,7 +107,7 @@
*/
/*!
\enum IDocument::ChangeType
\enum Core::IDocument::ChangeType
The ChangeType enum describes the way in which the file changed.
@@ -121,7 +121,7 @@
*/
/*!
\enum IDocument::ReloadFlag
\enum Core::IDocument::ReloadFlag
The ReloadFlag enum describes if a file should be reloaded from disk.

View File

@@ -74,7 +74,7 @@ public:
*/
/*!
\property IMode::enabled
\property Core::IMode::enabled
This property holds whether the mode is enabled.
@@ -82,7 +82,7 @@ public:
*/
/*!
\property IMode::displayName
\property Core::IMode::displayName
This property holds the display name of the mode.
@@ -90,7 +90,7 @@ public:
*/
/*!
\property IMode::icon
\property Core::IMode::icon
This property holds the icon of the mode.
@@ -99,7 +99,7 @@ public:
*/
/*!
\property IMode::priority
\property Core::IMode::priority
This property holds the priority of the mode.
@@ -110,7 +110,7 @@ public:
*/
/*!
\property IMode::id
\property Core::IMode::id
This property holds the ID of the mode.
*/

View File

@@ -17,7 +17,7 @@ namespace Core {
*/
/*!
\enum IOutputPane::Flag
\enum Core::IOutputPane::Flag
This enum type controls the behavior of the output pane when it is requested to show itself.

View File

@@ -884,7 +884,8 @@ void ILocatorFilter::setConfigurable(bool configurable)
/*!
Shows the standard configuration dialog with options for the prefix string
and for isIncludedByDefault(). The \a additionalWidget is added at the top.
and for isIncludedByDefault(). \a parent is used as the dialog's parent.
The \a additionalWidget is added at the top.
Ownership of \a additionalWidget stays with the caller, but its parent is
reset to \c nullptr.

View File

@@ -472,6 +472,9 @@ void CppHighlighter::highlightStringLiteral(QStringView text, const CPlusPlus::T
case T_UTF8_STRING_LITERAL:
case T_UTF16_STRING_LITERAL:
case T_UTF32_STRING_LITERAL:
case T_WIDE_CHAR_LITERAL:
case T_UTF16_CHAR_LITERAL:
case T_UTF32_CHAR_LITERAL:
break;
default:
if (!tk.userDefinedLiteral()) { // Simple case: No prefix, no suffix.
@@ -481,16 +484,17 @@ void CppHighlighter::highlightStringLiteral(QStringView text, const CPlusPlus::T
}
}
const char quote = tk.isStringLiteral() ? '"' : '\'';
int stringOffset = 0;
if (!tk.f.joined) {
stringOffset = text.indexOf('"', tk.utf16charsBegin());
stringOffset = text.indexOf(quote, tk.utf16charsBegin());
QTC_ASSERT(stringOffset > 0, return);
setFormat(tk.utf16charsBegin(), stringOffset - tk.utf16charsBegin(),
formatForCategory(C_KEYWORD));
}
int operatorOffset = tk.utf16charsBegin() + tk.utf16chars();
if (tk.userDefinedLiteral()) {
const int closingQuoteOffset = text.lastIndexOf('"', operatorOffset);
const int closingQuoteOffset = text.lastIndexOf(quote, operatorOffset);
QTC_ASSERT(closingQuoteOffset >= tk.utf16charsBegin(), return);
operatorOffset = closingQuoteOffset + 1;
}
@@ -498,7 +502,10 @@ void CppHighlighter::highlightStringLiteral(QStringView text, const CPlusPlus::T
formatForCategory(C_STRING));
if (const int operatorLength = tk.utf16charsBegin() + tk.utf16chars() - operatorOffset;
operatorLength > 0) {
setFormat(operatorOffset, operatorLength, formatForCategory(C_OPERATOR));
setFormat(
operatorOffset,
operatorLength,
formatForCategory(tk.userDefinedLiteral() ? C_OVERLOADED_OPERATOR : C_OPERATOR));
}
}
@@ -627,6 +634,12 @@ private slots:
<< 49 << 1 << 49 << 1 << C_STRING;
QTest::newRow("multi-line raw string literal with consecutive closing parens (suffix)")
<< 49 << 2 << 49 << 3 << C_KEYWORD;
QTest::newRow("wide char literal with user-defined suffix (prefix)")
<< 73 << 16 << 73 << 16 << C_KEYWORD;
QTest::newRow("wide char literal with user-defined suffix (content)")
<< 73 << 17 << 73 << 18 << C_STRING;
QTest::newRow("wide char literal with user-defined suffix (suffix)")
<< 73 << 20 << 73 << 22 << C_OVERLOADED_OPERATOR;
}
void test()

View File

@@ -68,3 +68,6 @@ static void parenTest2()
}
}
wchar_t operator ""_wc(const wchar_t c) { return c; }
const auto c = L'c'_wc;

View File

@@ -185,6 +185,7 @@ void TypeHierarchyBuilder::buildDerived(const std::optional<QFuture<void>> &futu
return;
Document::Ptr doc = snapshot.document(fileName);
if ((_candidates.contains(fileName) && !_candidates.value(fileName).contains(symbolName))
|| !symbol->identifier()
|| !doc->control()->findIdentifier(symbol->identifier()->chars(),
symbol->identifier()->size())) {
continue;

View File

@@ -1827,6 +1827,7 @@ bool WatchModel::contextMenuEvent(const ItemViewEvent &ev)
menu->addAction(s.settingsDialog.action());
// useDebuggingHelpers/useDynamicType have no auto-apply, but need to be persisted on triggered
connect(this, &WatchModel::dataChanged, menu, &QMenu::close);
connect(debugHelperAction, &QAction::triggered,
&s.useDebuggingHelpers, &BoolAspect::writeSettings, Qt::UniqueConnection);
connect(dynamicTypeAction, &QAction::triggered,

View File

@@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "formwindowfile.h"
#include "qtcreatorintegration.h"
#include "designerconstants.h"
#include "resourcehandler.h"
@@ -230,6 +231,10 @@ bool FormWindowFile::writeFile(const Utils::FilePath &filePath, QString *errorSt
{
if (Designer::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO << this->filePath() << filePath;
auto *integration = qobject_cast<QtCreatorIntegration *>(m_formWindow->core()->integration());
Q_ASSERT(integration);
if (!integration->setQtVersionFromFile(filePath))
integration->resetQtVersion();
return write(filePath, format(), m_formWindow->contents(), errorString);
}

View File

@@ -37,6 +37,8 @@
#include <texteditor/texteditor.h>
#include <texteditor/textdocument.h>
#include <qtsupport/qtkitaspect.h>
#include <utils/algorithm.h>
#include <utils/fileutils.h>
#include <utils/mimeutils.h>
@@ -45,16 +47,20 @@
#include <utils/temporaryfile.h>
#include <QDesignerFormWindowInterface>
#include <QDesignerFormWindowManagerInterface>
#include <QDesignerFormEditorInterface>
#include <QDebug>
#include <QDir>
#include <QFileInfo>
#include <QLibraryInfo>
#include <QLoggingCategory>
#include <QMessageBox>
#include <QHash>
#include <QVersionNumber>
#include <QUrl>
#include <memory>
#include <optional>
Q_LOGGING_CATEGORY(log, "qtc.designer", QtWarningMsg);
@@ -84,6 +90,17 @@ static void reportRenamingError(const QString &oldName, const QString &reason)
.arg(oldName, reason));
}
static std::optional<QVersionNumber> qtVersionFromProject(const Project *project)
{
if (const auto *target = project->activeTarget()) {
if (const auto *kit = target->kit(); kit->isValid()) {
if (const auto *qtVersion = QtSupport::QtKitAspect::qtVersion(kit))
return qtVersion->qtVersion();
}
}
return std::nullopt;
}
class QtCreatorIntegration::Private
{
public:
@@ -143,6 +160,10 @@ QtCreatorIntegration::QtCreatorIntegration(QDesignerFormEditorInterface *core, Q
}
}
});
auto *fwm = core->formWindowManager();
connect(fwm, &QDesignerFormWindowManagerInterface::activeFormWindowChanged,
this, &QtCreatorIntegration::slotActiveFormWindowChanged);
}
QtCreatorIntegration::~QtCreatorIntegration()
@@ -433,6 +454,40 @@ static ClassDocumentPtrPair
return ClassDocumentPtrPair(0, Document::Ptr());
}
void QtCreatorIntegration::slotActiveFormWindowChanged(QDesignerFormWindowInterface *formWindow)
{
if (formWindow == nullptr
|| !setQtVersionFromFile(Utils::FilePath::fromString(formWindow->fileName()))) {
resetQtVersion();
}
}
// Set the file's Qt version on the integration for Qt Designer to write
// it out in the appropriate format (PYSIDE-2492, scoped enum support).
bool QtCreatorIntegration::setQtVersionFromFile(const Utils::FilePath &filePath)
{
if (const auto *uiProject = ProjectManager::projectForFile(filePath)) {
if (auto versionOpt = qtVersionFromProject(uiProject)) {
setQtVersion(versionOpt.value());
return true;
}
}
return false;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
// FIXME: To be replaced by a real property setter on QDesignerIntegration
void QtCreatorIntegration::setQtVersion(const QVersionNumber &version)
{
setProperty("qtVersion", QVariant::fromValue(version));
}
#endif // < 6.9
void QtCreatorIntegration::resetQtVersion()
{
setQtVersion(QLibraryInfo::version());
}
void QtCreatorIntegration::slotNavigateToSlot(const QString &objectName, const QString &signalSignature,
const QStringList &parameterNames)
{

View File

@@ -8,8 +8,11 @@
QT_BEGIN_NAMESPACE
class QUrl;
class QVersionNumber;
QT_END_NAMESPACE
namespace Utils { class FilePath; }
namespace Designer {
namespace Internal {
@@ -27,10 +30,14 @@ public:
void updateSelection() override;
bool setQtVersionFromFile(const Utils::FilePath &filePath);
void resetQtVersion();
signals:
void creatorHelpRequested(const QUrl &url);
private:
void slotActiveFormWindowChanged(QDesignerFormWindowInterface *formWindow);
void slotNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList &parameterNames);
void slotDesignerHelpRequested(const QString &manual, const QString &document);
void slotSyncSettingsToDesigner();
@@ -44,6 +51,10 @@ private:
void handleSymbolRenameStage2(QDesignerFormWindowInterface *formWindow,
const QString &newName, const QString &oldName);
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
void setQtVersion(const QVersionNumber &version);
#endif
class Private;
Private * const d;
};

View File

@@ -114,6 +114,7 @@ FakeVimSettings::FakeVimSettings()
tabStop.setToolTip(Tr::tr("Vim tabstop option."));
#ifndef FAKEVIM_STANDALONE
tabStop.setRange(1, 99);
backspace.setDisplayStyle(FvStringAspect::LineEditDisplay);
isKeyword.setDisplayStyle(FvStringAspect::LineEditDisplay);

View File

@@ -75,6 +75,7 @@ void setupFetchModule()
Module()
{
setSettingsGroup("Lua.Fetch");
setAutoApply(false);
pluginsAllowedToFetch.setSettingsKey("pluginsAllowedToFetch");
pluginsAllowedToFetch.setLabelText("Plugins allowed to fetch data from the internet");

View File

@@ -1140,6 +1140,7 @@ LinuxDevicePrivate::LinuxDevicePrivate(LinuxDevice *parent)
LinuxDevicePrivate::~LinuxDevicePrivate()
{
QMutexLocker locker(&m_shellMutex);
auto closeShell = [this] {
m_shellThread.quit();
m_shellThread.wait();

View File

@@ -38,7 +38,14 @@ enum MemcheckError
Leak_PossiblyLost,
Leak_StillReachable,
Leak_IndirectlyLost,
ReallocSizeZero
ReallocSizeZero,
InvalidSize,
InvalidSizeAndAlignment,
InvalidAlignment,
MismatchedAllocateDeallocateSize,
MismatchedAllocateDeallocateAlignment,
FishyValue,
// CoreMemError // questionable, seems to be unlikely to happen
};
Q_ENUM_NS(MemcheckError);

View File

@@ -35,10 +35,12 @@ VcpkgSettings::VcpkgSettings()
vcpkgRoot.setSettingsKey("VcpkgRoot");
vcpkgRoot.setExpectedKind(PathChooser::ExistingDirectory);
FilePath defaultPath = Environment::systemEnvironment().searchInPath(Constants::VCPKG_COMMAND)
.parentDir();
FilePath defaultPath = FilePath::fromUserInput(
qtcEnvironmentVariable(Constants::ENVVAR_VCPKG_ROOT));
if (!defaultPath.isDir())
defaultPath = FilePath::fromUserInput(qtcEnvironmentVariable(Constants::ENVVAR_VCPKG_ROOT));
defaultPath = Environment::systemEnvironment().searchInPath(Constants::VCPKG_COMMAND).parentDir();
if (defaultPath.isDir())
vcpkgRoot.setDefaultPathValue(defaultPath);