forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/12.0'
Change-Id: I17c37a6fd474c3441343e91a67817c8179d0c7cc
This commit is contained in:
68
dist/changelog/changes-12.0.0.md
vendored
68
dist/changelog/changes-12.0.0.md
vendored
@@ -71,7 +71,15 @@ General
|
||||
without a unified menu bar
|
||||
([QTCREATORBUG-29498](https://bugreports.qt.io/browse/QTCREATORBUG-29498))
|
||||
([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-show-and-hide-main-menu.html))
|
||||
* Changed the `Enable high DPI scaling` setting to a `DPI rounding policy`
|
||||
setting, which fits Qt's settings better
|
||||
([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-set-high-dpi-scaling.html))
|
||||
* Fixed an issue with growing session files
|
||||
* Fixed that the shortcuts for the navigation views could be stuck to opening a
|
||||
view in the right side bar
|
||||
([QTCREATORBUG-29770](https://bugreports.qt.io/browse/QTCREATORBUG-29770))
|
||||
* Fixed that the shortcut for Locator switched to the main window
|
||||
([QTCREATORBUG-29741](https://bugreports.qt.io/browse/QTCREATORBUG-29741))
|
||||
|
||||
Help
|
||||
----
|
||||
@@ -90,6 +98,7 @@ Editing
|
||||
([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-coding-navigating.html#navigating-between-open-files-and-symbols))
|
||||
* Added an indenter, auto-brace and auto-quote for JSON
|
||||
([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-enclose-code-in-characters.html))
|
||||
* Improved the performance of searching in big documents
|
||||
* Fixed that the historical order of open documents was not restored
|
||||
* Fixed that suggestions were rendered with the wrong tab size
|
||||
([QTCREATORBUG-29483](https://bugreports.qt.io/browse/QTCREATORBUG-29483))
|
||||
@@ -119,8 +128,17 @@ Editing
|
||||
* Fixed that automatically created functions could be added between another
|
||||
function and its documentation
|
||||
([QTCREATORBUG-6934](https://bugreports.qt.io/browse/QTCREATORBUG-6934))
|
||||
* Fixed that the refactoring actions from Clangd were not available in the
|
||||
context menu
|
||||
* Fixed that scope names were considered when searching for `C++ Symbols` with
|
||||
advanced find
|
||||
([QTCREATORBUG-29133](https://bugreports.qt.io/browse/QTCREATORBUG-29133))
|
||||
* Clangd
|
||||
* Added the `Completion ranking model` option for choosing the order of
|
||||
completion results
|
||||
([QTCREATORBUG-29013](https://bugreports.qt.io/browse/QTCREATORBUG-29013))
|
||||
* Fixed that the refactoring actions from Clangd were not available in the
|
||||
context menu
|
||||
* Fixed that renaming symbols could rename them in generated files
|
||||
([QTCREATORBUG-29778](https://bugreports.qt.io/browse/QTCREATORBUG-29778))
|
||||
* Clang Format
|
||||
* Fixed the style settings for Clang Format 16 and later
|
||||
([QTCREATORBUG-29434](https://bugreports.qt.io/browse/QTCREATORBUG-29434))
|
||||
@@ -144,11 +162,18 @@ Editing
|
||||
of files
|
||||
([QTCREATORBUG-29542](https://bugreports.qt.io/browse/QTCREATORBUG-29542))
|
||||
|
||||
### Widget Designer
|
||||
|
||||
* Fixed that renaming layouts in the property editor switched to edit mode
|
||||
([QTCREATORBUG-29644](https://bugreports.qt.io/browse/QTCREATORBUG-29644))
|
||||
|
||||
### Copilot
|
||||
|
||||
* Added support for proxies
|
||||
([QTCREATORBUG-29485](https://bugreports.qt.io/browse/QTCREATORBUG-29485))
|
||||
([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-copilot.html))
|
||||
* Fixed the auto-detection of `agent.js`
|
||||
([QTCREATORBUG-29750](https://bugreports.qt.io/browse/QTCREATORBUG-29750))
|
||||
|
||||
### TODO
|
||||
|
||||
@@ -207,6 +232,15 @@ Projects
|
||||
* Added help tooltips
|
||||
([QTCREATORBUG-25780](https://bugreports.qt.io/browse/QTCREATORBUG-25780))
|
||||
* Extended context help for variables, properties and modules
|
||||
* Improved performance when switching sessions
|
||||
([QTCREATORBUG-27729](https://bugreports.qt.io/browse/QTCREATORBUG-27729))
|
||||
* Fixed issues with the subdirectory structure of the project tree
|
||||
([QTCREATORBUG-23942](https://bugreports.qt.io/browse/QTCREATORBUG-23942),
|
||||
[QTCREATORBUG-29105](https://bugreports.qt.io/browse/QTCREATORBUG-29105))
|
||||
* Presets
|
||||
* Fixed that variables were not expanded for `cmakeExecutable`
|
||||
([QTCREATORBUG-29643](https://bugreports.qt.io/browse/QTCREATORBUG-29643))
|
||||
* Fixed unnecessary restrictions on the preset name
|
||||
|
||||
### Python
|
||||
|
||||
@@ -217,6 +251,11 @@ Projects
|
||||
([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-run-settings.html#specifying-run-settings-for-linux-based-devices))
|
||||
* Fixed PySide wheels installation on macOS
|
||||
|
||||
### qmake
|
||||
|
||||
* Fixed the project tree structure in case of some subfolder structures
|
||||
([QTCREATORBUG-29733](https://bugreports.qt.io/browse/QTCREATORBUG-29733))
|
||||
|
||||
### vcpkg
|
||||
|
||||
* Added the generation of code for `CMakeLists.txt`
|
||||
@@ -244,6 +283,8 @@ Analyzer
|
||||
|
||||
* Fixed that error messages were not shown
|
||||
([QTCREATORBUG-29298](https://bugreports.qt.io/browse/QTCREATORBUG-29298))
|
||||
* Fixed that `-mno-direct-extern-access` could be passed to `clang-tidy` which
|
||||
does not support it
|
||||
|
||||
### CTF Visualizer
|
||||
|
||||
@@ -263,8 +304,10 @@ Version Control Systems
|
||||
|
||||
### Git
|
||||
|
||||
* Added option for ignoring whitespace changes and line moves in `Instant Blame`
|
||||
* Added the `Ignore whitespace changes` and `Ignore line moves` options to
|
||||
`Preferences > Version Control > Git > Instant Blame`
|
||||
([QTCREATORBUG-29378](https://bugreports.qt.io/browse/QTCREATORBUG-29378))
|
||||
([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-vcs-git.html))
|
||||
|
||||
### CVS
|
||||
|
||||
@@ -275,6 +318,23 @@ Test Integration
|
||||
|
||||
* Added an option for the number of threads used for scanning
|
||||
([QTCREATORBUG-29301](https://bugreports.qt.io/browse/QTCREATORBUG-29301))
|
||||
* Improved the wizards for `GTest` and `Catch2`
|
||||
|
||||
Platforms
|
||||
---------
|
||||
|
||||
### Android
|
||||
|
||||
* Fixed issues when `LIBRARY_OUTPUT_DIRECTORY` is set in the CMake build files
|
||||
([QTCREATORBUG-26479](https://bugreports.qt.io/browse/QTCREATORBUG-26479))
|
||||
|
||||
### iOS
|
||||
|
||||
* Known Issue: iOS 17 devices are not supported
|
||||
|
||||
### Docker
|
||||
|
||||
* Fixed the check for commands that are built-ins of the shell
|
||||
|
||||
Credits for these changes go to:
|
||||
--------------------------------
|
||||
@@ -304,6 +364,7 @@ Jonas Karlsson
|
||||
Jussi Witick
|
||||
Knud Dollereder
|
||||
Leena Miettinen
|
||||
Ludovic Le Brun
|
||||
Mahmoud Badri
|
||||
Marco Bubke
|
||||
Marcus Tillmanns
|
||||
@@ -317,6 +378,7 @@ Pranta Dastider
|
||||
Robert Löhning
|
||||
Sami Shalayel
|
||||
Samuel Ghinet
|
||||
Samuli Piippo
|
||||
Semih Yavuz
|
||||
Tasuku Suzuki
|
||||
Thiago Macieira
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 8.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.6 KiB |
@@ -406,6 +406,10 @@
|
||||
\uicontrol {Active Test Frameworks} list.
|
||||
By default, \QC groups tests that are in the same directory.
|
||||
|
||||
By default, \QC uses a quarter of the available logical CPUs when
|
||||
scanning for tests. You can set the amount of worker threads used
|
||||
in \uicontrol {Scan threads}.
|
||||
|
||||
\QC omits internal messages and run configuration warnings for
|
||||
deduced configurations by default. To view them, deselect the
|
||||
\uicontrol {Omit internal messages} and
|
||||
|
||||
@@ -144,9 +144,13 @@
|
||||
By default, each line is annotated in the editor when you scroll through
|
||||
the file. To disable this feature, select \preferences >
|
||||
\uicontrol {Version Control} > \uicontrol Git, and
|
||||
deselect \uicontrol {Add instant blame annotations to editor}. To view
|
||||
annotations for the current line, select \uicontrol Tools > \uicontrol Git >
|
||||
\uicontrol {Current File} > \uicontrol {Instant Blame}.
|
||||
deselect \uicontrol {Instant Blame}. To find the commit that introduced
|
||||
the last real code change, select \uicontrol {Ignore whitespace changes}.
|
||||
To find the commit that introduced a line before it was moved, select
|
||||
\uicontrol {Ignore line moves}.
|
||||
|
||||
To view annotations for the current line, select \uicontrol Tools >
|
||||
\uicontrol Git > \uicontrol {Current File} > \uicontrol {Instant Blame}.
|
||||
|
||||
Click the commit identifier to show a detailed description of the change.
|
||||
|
||||
|
||||
@@ -328,10 +328,16 @@ def qdump__QDateTime(d, value):
|
||||
isValid = status & 0x08
|
||||
else:
|
||||
dptr = d.extractPointer(value)
|
||||
(msecs, status, offsetFromUtc, ref, timeZone) = d.split('qIIIp', dptr)
|
||||
(_, status, msecs, offsetFromUtc, _, timeZone) = d.split('iIqII{QTimeZone}', dptr)
|
||||
spec = (status & 0x30) >> 4
|
||||
isValid = True
|
||||
|
||||
tzD = d.extractPointer(timeZone)
|
||||
if tzD == 0:
|
||||
timeZone = 'UTC'
|
||||
else:
|
||||
idAddr = tzD + 2 * d.ptrSize()
|
||||
tzBa = d.encodeByteArray(idAddr, limit=100)
|
||||
timeZone = tzBa
|
||||
d.putValue(
|
||||
'%s/%s/%s/%s/%s/%s' %
|
||||
(msecs,
|
||||
@@ -365,7 +371,7 @@ def qdump__QDateTime(d, value):
|
||||
tz = ''
|
||||
else:
|
||||
idBase = tzp + 2 * d.ptrSize() # [QSharedData] + [vptr]
|
||||
elided, tz = d.encodeByteArray(idBase, limit=100)
|
||||
tz = d.encodeByteArray(idBase, limit=100)
|
||||
d.putValue('%s/%s/%s/%s/%s/%s' % (msecs, spec, offset, tz, status, 0),
|
||||
'datetimeinternal')
|
||||
else:
|
||||
|
||||
@@ -76,7 +76,7 @@ QVariant QtTestTreeItem::data(int column, int role) const
|
||||
return m_multiTest;
|
||||
}
|
||||
case LinkRole:
|
||||
if (type() == GroupNode)
|
||||
if (type() == GroupNode || type() == Root)
|
||||
return QVariant();
|
||||
if (type() == TestDataFunction || type() == TestDataTag)
|
||||
return TestTreeItem::data(column, role);
|
||||
|
||||
@@ -775,22 +775,23 @@ void CMakeBuildStep::updateDeploymentData()
|
||||
DeploymentData deploymentData;
|
||||
deploymentData.setLocalInstallRoot(rootDir);
|
||||
|
||||
IDeviceConstPtr device = BuildDeviceKitAspect::device(buildSystem()->kit());
|
||||
IDeviceConstPtr runDevice = DeviceKitAspect::device(buildSystem()->kit());
|
||||
|
||||
const auto appFileNames = transform<QSet<QString>>(buildSystem()->applicationTargets(),
|
||||
[](const BuildTargetInfo &appTarget) { return appTarget.targetFilePath.fileName(); });
|
||||
|
||||
auto handleFile = [&appFileNames, rootDir, &deploymentData, device](const FilePath &filePath) {
|
||||
const DeployableFile::Type type = appFileNames.contains(filePath.fileName())
|
||||
? DeployableFile::TypeExecutable
|
||||
: DeployableFile::TypeNormal;
|
||||
auto handleFile =
|
||||
[&appFileNames, rootDir, &deploymentData, runDevice](const FilePath &filePath) {
|
||||
const DeployableFile::Type type = appFileNames.contains(filePath.fileName())
|
||||
? DeployableFile::TypeExecutable
|
||||
: DeployableFile::TypeNormal;
|
||||
|
||||
FilePath targetDirPath = filePath.parentDir().relativePathFrom(rootDir);
|
||||
FilePath targetDirPath = filePath.parentDir().relativePathFrom(rootDir);
|
||||
|
||||
const FilePath targetDir = device->rootPath().pathAppended(targetDirPath.path());
|
||||
deploymentData.addFile(filePath, targetDir.nativePath(), type);
|
||||
return IterationPolicy::Continue;
|
||||
};
|
||||
const FilePath targetDir = runDevice->rootPath().pathAppended(targetDirPath.path());
|
||||
deploymentData.addFile(filePath, targetDir.nativePath(), type);
|
||||
return IterationPolicy::Continue;
|
||||
};
|
||||
|
||||
rootDir.iterateDirectory(handleFile,
|
||||
{{}, QDir::Files | QDir::Hidden, QDirIterator::Subdirectories});
|
||||
|
||||
@@ -272,6 +272,8 @@ static QString newFilesForFunction(const std::string &cmakeFunction,
|
||||
|
||||
bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FilePaths *notAdded)
|
||||
{
|
||||
if (notAdded)
|
||||
*notAdded = filePaths;
|
||||
if (auto n = dynamic_cast<CMakeTargetNode *>(context)) {
|
||||
const QString targetName = n->buildKey();
|
||||
auto target = Utils::findOrDefault(buildTargets(),
|
||||
@@ -279,10 +281,9 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP
|
||||
return target.title == targetName;
|
||||
});
|
||||
|
||||
if (target.backtrace.isEmpty()) {
|
||||
*notAdded = filePaths;
|
||||
if (target.backtrace.isEmpty())
|
||||
return false;
|
||||
}
|
||||
|
||||
const FilePath targetCMakeFile = target.backtrace.last().path;
|
||||
const int targetDefinitionLine = target.backtrace.last().line;
|
||||
|
||||
@@ -297,7 +298,6 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP
|
||||
if (!cmakeListFile.ParseString(fileContent->toStdString(),
|
||||
targetCMakeFile.fileName().toStdString(),
|
||||
errorString)) {
|
||||
*notAdded = filePaths;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -308,10 +308,8 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP
|
||||
return func.Line() == targetDefinitionLine;
|
||||
});
|
||||
|
||||
if (function == cmakeListFile.Functions.end()) {
|
||||
*notAdded = filePaths;
|
||||
if (function == cmakeListFile.Functions.end())
|
||||
return false;
|
||||
}
|
||||
|
||||
// Special case: when qt_add_executable and qt_add_qml_module use the same target name
|
||||
// then qt_add_qml_module function should be used
|
||||
@@ -385,16 +383,16 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP
|
||||
Core::EditorManager::openEditorAt({targetCMakeFile, line, column + extraChars},
|
||||
Constants::CMAKE_EDITOR_ID,
|
||||
Core::EditorManager::DoNotMakeVisible));
|
||||
if (!editor) {
|
||||
*notAdded = filePaths;
|
||||
if (!editor)
|
||||
return false;
|
||||
}
|
||||
|
||||
editor->insert(snippet);
|
||||
editor->editorWidget()->autoIndent();
|
||||
if (!Core::DocumentManager::saveDocument(editor->document()))
|
||||
return false;
|
||||
|
||||
if (notAdded)
|
||||
notAdded->clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,12 @@ private:
|
||||
|
||||
void onFilter(QLoggingCategory *category)
|
||||
{
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(
|
||||
this, [category, this] { onFilter(category); }, Qt::QueuedConnection);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_categories.contains(category)) {
|
||||
m_categories.append(category);
|
||||
emit newLogCategory(category);
|
||||
@@ -108,7 +114,7 @@ private:
|
||||
bool m_started{false};
|
||||
};
|
||||
|
||||
QLoggingCategory::CategoryFilter LogCategoryRegistry::s_oldFilter;
|
||||
QLoggingCategory::CategoryFilter LogCategoryRegistry::s_oldFilter = nullptr;
|
||||
|
||||
struct SavedEntry
|
||||
{
|
||||
@@ -1100,6 +1106,8 @@ void setCategoryColor(const QString &category, const QColor &color)
|
||||
s_categoryColor.remove(category);
|
||||
}
|
||||
|
||||
static bool wasLogViewerShown = false;
|
||||
|
||||
void LoggingViewer::showLoggingView()
|
||||
{
|
||||
LoggingViewManagerWidget *staticLogWidget = LoggingViewManagerWidget::instance();
|
||||
@@ -1108,10 +1116,15 @@ void LoggingViewer::showLoggingView()
|
||||
staticLogWidget->show();
|
||||
staticLogWidget->raise();
|
||||
staticLogWidget->activateWindow();
|
||||
|
||||
wasLogViewerShown = true;
|
||||
}
|
||||
|
||||
void LoggingViewer::hideLoggingView()
|
||||
{
|
||||
if (!wasLogViewerShown)
|
||||
return;
|
||||
|
||||
LoggingViewManagerWidget *staticLogWidget = LoggingViewManagerWidget::instance();
|
||||
QTC_ASSERT(staticLogWidget, return);
|
||||
staticLogWidget->close();
|
||||
|
||||
@@ -737,9 +737,11 @@ QString decodeData(const QString &ba, const QString &encoding)
|
||||
if (spec == Qt::OffsetFromUTC) {
|
||||
dateTime = QDateTime(date, time, spec, offset);
|
||||
} else if (spec == Qt::TimeZone) {
|
||||
if (!QTimeZone::isTimeZoneIdAvailable(timeZoneId))
|
||||
QTimeZone tz(timeZoneId);
|
||||
if (!tz.isValid())
|
||||
return QLatin1String("<unavailable>");
|
||||
dateTime = QDateTime(date, time, QTimeZone(timeZoneId));
|
||||
|
||||
dateTime = QDateTime(date, time, tz);
|
||||
} else {
|
||||
dateTime = QDateTime(date, time, spec);
|
||||
}
|
||||
|
||||
@@ -746,6 +746,8 @@ void IosSimulatorToolHandlerPrivate::requestTransferApp(const FilePath &appBundl
|
||||
installAppOnSimulator();
|
||||
} else {
|
||||
errorMsg(Tr::tr("Application install on simulator failed. Simulator not running."));
|
||||
if (!response.commandOutput.isEmpty())
|
||||
errorMsg(response.commandOutput);
|
||||
didTransferApp(m_bundlePath, m_deviceId, IosToolHandler::Failure);
|
||||
emit q->finished(q);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "simulatorcontrol.h"
|
||||
#include "iosconfigurations.h"
|
||||
#include "iostr.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/async.h>
|
||||
@@ -384,10 +385,10 @@ void startSimulator(QPromise<SimulatorControl::ResponseData> &promise, const QSt
|
||||
SimulatorInfo simInfo = deviceInfo(simUdid);
|
||||
|
||||
if (!simInfo.available) {
|
||||
qCDebug(simulatorLog) << "Simulator device is not available." << simUdid;
|
||||
promise.addResult(
|
||||
response.withError(Tr::tr("Simulator device is not available. (%1)").arg(simUdid)));
|
||||
return;
|
||||
}
|
||||
|
||||
// Shutting down state checks are for the case when simulator start is called within a short
|
||||
// interval of closing the previous interval of the simulator. We wait untill the shutdown
|
||||
// process is complete.
|
||||
@@ -399,8 +400,14 @@ void startSimulator(QPromise<SimulatorControl::ResponseData> &promise, const QSt
|
||||
}
|
||||
|
||||
if (simInfo.isShuttingDown()) {
|
||||
qCDebug(simulatorLog) << "Cannot start Simulator device. "
|
||||
<< "Previous instance taking too long to shutdown." << simInfo;
|
||||
promise.addResult(response.withError(
|
||||
Tr::tr("Cannot start Simulator device. Previous instance taking "
|
||||
"too long to shut down. (name=%1, udid=%2, available=%3, state=%4, runtime=%5)")
|
||||
.arg(simInfo.name)
|
||||
.arg(simInfo.identifier)
|
||||
.arg(simInfo.available)
|
||||
.arg(simInfo.state)
|
||||
.arg(simInfo.runtimeName)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -421,11 +428,19 @@ void startSimulator(QPromise<SimulatorControl::ResponseData> &promise, const QSt
|
||||
if (info.isBooted())
|
||||
response.success = true;
|
||||
} else {
|
||||
qCDebug(simulatorLog) << "Error starting simulator.";
|
||||
promise.addResult(response.withError(Tr::tr("Error starting simulator.")));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
qCDebug(simulatorLog) << "Cannot start Simulator device. Simulator not in shutdown state."
|
||||
<< simInfo;
|
||||
promise.addResult(response.withError(
|
||||
Tr::tr("Cannot start Simulator device. Simulator not in shutdown state.(name=%1, "
|
||||
"udid=%2, available=%3, state=%4, runtime=%5)")
|
||||
.arg(simInfo.name)
|
||||
.arg(simInfo.identifier)
|
||||
.arg(simInfo.available)
|
||||
.arg(simInfo.state)
|
||||
.arg(simInfo.runtimeName)));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!promise.isCanceled())
|
||||
|
||||
@@ -61,6 +61,14 @@ public:
|
||||
bool success = false;
|
||||
qint64 pID = -1;
|
||||
QString commandOutput;
|
||||
|
||||
ResponseData withError(const QString errorMsg)
|
||||
{
|
||||
ResponseData result = *this;
|
||||
result.commandOutput = errorMsg;
|
||||
result.success = false;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
@@ -301,10 +301,13 @@ void PyLSConfigureAssistant::installPythonLanguageServer(const FilePath &python,
|
||||
auto install = new PipInstallTask(python);
|
||||
|
||||
connect(install, &PipInstallTask::finished, this, [=](const bool success) {
|
||||
const QList<TextEditor::TextDocument *> additionalDocuments = m_infoBarEntries.take(python);
|
||||
if (success) {
|
||||
if (document) {
|
||||
if (PyLSClient *client = clientForPython(python))
|
||||
if (PyLSClient *client = clientForPython(python)) {
|
||||
if (document)
|
||||
LanguageClientManager::openDocumentWithClient(document, client);
|
||||
for (TextEditor::TextDocument *additionalDocument : additionalDocuments)
|
||||
LanguageClientManager::openDocumentWithClient(additionalDocument, client);
|
||||
}
|
||||
}
|
||||
install->deleteLater();
|
||||
@@ -375,15 +378,6 @@ void PyLSConfigureAssistant::handlePyLSState(const FilePath &python,
|
||||
}
|
||||
}
|
||||
|
||||
void PyLSConfigureAssistant::updateEditorInfoBars(const FilePath &python, Client *client)
|
||||
{
|
||||
for (TextEditor::TextDocument *document : instance()->m_infoBarEntries.take(python)) {
|
||||
instance()->resetEditorInfoBar(document);
|
||||
if (client)
|
||||
LanguageClientManager::openDocumentWithClient(document, client);
|
||||
}
|
||||
}
|
||||
|
||||
void PyLSConfigureAssistant::resetEditorInfoBar(TextEditor::TextDocument *document)
|
||||
{
|
||||
for (QList<TextEditor::TextDocument *> &documents : m_infoBarEntries)
|
||||
|
||||
@@ -53,8 +53,6 @@ class PyLSConfigureAssistant : public QObject
|
||||
public:
|
||||
static PyLSConfigureAssistant *instance();
|
||||
|
||||
static void updateEditorInfoBars(const Utils::FilePath &python,
|
||||
LanguageClient::Client *client);
|
||||
static void openDocumentWithPython(const Utils::FilePath &python,
|
||||
TextEditor::TextDocument *document);
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ RecordOptionsDialog::RecordOptionsDialog(QWidget *parent)
|
||||
st,
|
||||
buttonBox,
|
||||
}.attachTo(this);
|
||||
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, this, [this] {
|
||||
const QRect cropRect = m_cropScene->fullySelected() ? QRect() : screenCropRect();
|
||||
|
||||
@@ -550,12 +550,18 @@ bool ShortcutMap::dispatchEvent(QKeyEvent *e)
|
||||
<< "\", " << next->id << ", " << static_cast<bool>(enabledShortcuts > 1)
|
||||
<< ") to object(" << next->owner << ')';
|
||||
}
|
||||
QShortcutEvent se(next->keyseq, next->id, enabledShortcuts > 1);
|
||||
QCoreApplication::sendEvent(const_cast<QObject *>(next->owner), &se);
|
||||
|
||||
QAction *action = qobject_cast<QAction *>(next->owner);
|
||||
if (action)
|
||||
if (auto action = qobject_cast<QAction *>(next->owner)) {
|
||||
// We call the action here ourselves instead of relying on sending a ShortCut event,
|
||||
// as the action will try to match the shortcut id to the global shortcutmap.
|
||||
// This triggers an annoying Q_ASSERT when linking against a debug Qt. Calling trigger
|
||||
// directly circumvents this.
|
||||
action->trigger();
|
||||
return action->isEnabled();
|
||||
} else {
|
||||
QShortcutEvent se(next->keyseq, next->id, enabledShortcuts > 1);
|
||||
QCoreApplication::sendEvent(const_cast<QObject *>(next->owner), &se);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Submodule src/shared/qbs updated: 40327c8277...d99256dd79
@@ -2260,7 +2260,10 @@ void tst_Dumpers::dumper_data()
|
||||
|
||||
|
||||
QTest::newRow("QDateTime")
|
||||
<< Data("#include <QDateTime>",
|
||||
<< Data("#include <QDateTime>\n"
|
||||
"#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)\n"
|
||||
"#include <QTimeZone>\n"
|
||||
"#endif",
|
||||
|
||||
"QDate d0;\n"
|
||||
"QDate d1;\n"
|
||||
@@ -2270,9 +2273,12 @@ void tst_Dumpers::dumper_data()
|
||||
"QTime t1(13, 15, 32);\n"
|
||||
|
||||
"QDateTime dt0;\n"
|
||||
"QDateTime dt1(QDate(1980, 1, 1), QTime(13, 15, 32), Qt::UTC);",
|
||||
"QDateTime dt1(QDate(1980, 1, 1), QTime(13, 15, 32), Qt::UTC);\n"
|
||||
"#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)\n"
|
||||
"QDateTime dt2(QDate(1980, 1, 1), QTime(13, 15, 32), QTimeZone(60 * 60));\n"
|
||||
"#endif\n",
|
||||
|
||||
"&d0, &d1, &t0, &t1, &dt0, &dt1")
|
||||
"&d0, &d1, &t0, &t1, &dt0, &dt1, &dt2")
|
||||
|
||||
+ CoreProfile()
|
||||
|
||||
@@ -2297,6 +2303,7 @@ void tst_Dumpers::dumper_data()
|
||||
+ Check("dt0", "(invalid)", "@QDateTime")
|
||||
+ Check("dt1", Value4("Tue Jan 1 13:15:32 1980"), "@QDateTime")
|
||||
+ Check("dt1", Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime")
|
||||
+ Check("dt1", Value6("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime")
|
||||
+ Check("dt1.(ISO)",
|
||||
"\"1980-01-01T13:15:32Z\"", "@QString") % NeedsInferiorCall
|
||||
+ Check("dt1.(Locale)", AnyValue, "@QString") % NeedsInferiorCall
|
||||
@@ -2306,11 +2313,13 @@ void tst_Dumpers::dumper_data()
|
||||
+ Check("dt1.toString",
|
||||
Value4("\"Tue Jan 1 13:15:32 1980\""), "@QString") % NeedsInferiorCall
|
||||
+ Check("dt1.toString",
|
||||
Value5("\"Tue Jan 1 13:15:32 1980 GMT\""), "@QString") % NeedsInferiorCall;
|
||||
Value5("\"Tue Jan 1 13:15:32 1980 GMT\""), "@QString") % NeedsInferiorCall
|
||||
//+ Check("dt1.toUTC",
|
||||
// Value4("Tue Jan 1 13:15:32 1980"), "@QDateTime") % Optional()
|
||||
//+ Check("dt1.toUTC",
|
||||
// Value5("Tue Jan 1 13:15:32 1980 GMT"), "@QDateTime") % Optional();
|
||||
+ Check("dt2", Value5("Tue Jan 1 13:15:32 1980 UTC+01:00"), "@QDateTime")
|
||||
+ Check("dt2", Value6("Tue Jan 1 13:15:32 1980 UTC+01:00"), "@QDateTime");
|
||||
|
||||
|
||||
QTest::newRow("QFileInfo")
|
||||
|
||||
Reference in New Issue
Block a user