Merge remote-tracking branch 'origin/4.10' into 4.11

Change-Id: Ic05bd53ea060d42c2013884972c05de08ed63f10
This commit is contained in:
Eike Ziller
2019-09-30 10:36:00 +02:00
4 changed files with 48 additions and 22 deletions

View File

@@ -19,9 +19,13 @@ you can check out from the public Git repository. For example:
* Fixed that text moved around when resizing and zooming (QTCREATORBUG-4756)
## All Projects
* Fixed `Qt Creator Plugin` wizard (QTCREATORBUG-22945)
## Debugging
* Fixed more layout restoration issues (QTCREATORBUG-22286, QTCREATORBUG-22938)
* Fixed more layout restoration issues (QTCREATORBUG-22286, QTCREATORBUG-22415, QTCREATORBUG-22938)
### LLDB
@@ -36,7 +40,13 @@ you can check out from the public Git repository. For example:
### macOS
* Fixed debugging with Xcode 11 (QTCREATORBUG-22955)
* Fixed window stacking order after closing file dialog (QTCREATORBUG-22906)
* Fixed window size after exiting fullscreen
### QNX
* Fixed that QNX compiler could not be selected for C
## Credits for these changes go to:
@@ -44,7 +54,9 @@ Aleksei German
Alexander Akulich
Andre Hartmann
André Pönitz
Christian Kandeler
Christian Stenger
Cristian Adam
David Schulz
Eike Ziller
Knud Dollereder
@@ -53,5 +65,5 @@ Lisandro Damián Nicanor Pérez Meyer
Nikolai Kosjar
Orgad Shaneh
Richard Weickelt
Sergey Belyashov
Thomas Hartmann

View File

@@ -381,27 +381,41 @@ QList<ToolChain *> SdccToolChainFactory::autoDetect(const QList<ToolChain *> &al
if (Utils::HostOsInfo::isWindowsHost()) {
#ifdef Q_OS_WIN64
static const char kRegistryNode[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\SDCC";
#else
static const char kRegistryNode[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\SDCC";
#endif
QSettings registry(kRegistryNode, QSettings::NativeFormat);
QString compilerPath = registry.value("Default").toString();
if (!compilerPath.isEmpty()) {
// Tries to detect the candidate from the 32-bit
// or 64-bit system registry format.
auto probeCandidate = [](QSettings::Format format) {
QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\SDCC",
format);
QString compilerPath = registry.value("Default").toString();
if (compilerPath.isEmpty())
return Candidate{};
// Build full compiler path.
compilerPath += "\\bin\\sdcc.exe";
const FilePath fn = FilePath::fromString(
QFileInfo(compilerPath).absoluteFilePath());
if (compilerExists(fn)) {
// Build compiler version.
const QString version = QString("%1.%2.%3").arg(
registry.value("VersionMajor").toString(),
registry.value("VersionMinor").toString(),
registry.value("VersionRevision").toString());
candidates.push_back({fn, version});
}
if (!compilerExists(fn))
return Candidate{};
// Build compiler version.
const QString version = QString("%1.%2.%3").arg(
registry.value("VersionMajor").toString(),
registry.value("VersionMinor").toString(),
registry.value("VersionRevision").toString());
return Candidate{fn, version};
};
const QSettings::Format allowedFormats[] = {
QSettings::NativeFormat,
#ifdef Q_OS_WIN
QSettings::Registry32Format,
QSettings::Registry64Format
#endif
};
for (const QSettings::Format format : allowedFormats) {
const auto candidate = probeCandidate(format);
if (candidate.compilerPath.isEmpty() || candidates.contains(candidate))
continue;
candidates.push_back(candidate);
}
}

View File

@@ -2285,8 +2285,8 @@ void DebuggerEngine::openDisassemblerView(const Location &location)
void DebuggerEngine::raiseWatchersWindow()
{
if (d->m_watchersView) {
if (auto dock = qobject_cast<QDockWidget *>(d->m_watchersView->parentWidget())) {
if (d->m_watchersView && d->m_watchersWindow) {
if (auto dock = qobject_cast<QDockWidget *>(d->m_watchersWindow->parentWidget())) {
if (QAction *act = dock->toggleViewAction()) {
if (!act->isChecked())
QTimer::singleShot(1, act, [act] { act->trigger(); });