forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/10.0'
Change-Id: I98e5e1ad43103984b490c65cdeed84b7414303b3
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 18 KiB |
@@ -38,22 +38,26 @@
|
|||||||
The process of setting up debugging for Qt Quick projects depends on the
|
The process of setting up debugging for Qt Quick projects depends on the
|
||||||
\l{Creating Qt Quick Projects}{type of the project}: Qt Quick UI or Qt Quick
|
\l{Creating Qt Quick Projects}{type of the project}: Qt Quick UI or Qt Quick
|
||||||
Application, and the Qt version used.
|
Application, and the Qt version used.
|
||||||
|
|
||||||
|
\section2 Debugging Qt Quick UI Projects
|
||||||
\endif
|
\endif
|
||||||
|
|
||||||
To debug Qt Quick UI projects, select the \uicontrol {Enable QML} check box in the
|
To debug Qt Quick UI projects (.qmlproject), select the
|
||||||
\uicontrol {Debugger Settings} in \uicontrol Projects mode \uicontrol {Run Settings}.
|
\uicontrol {Enable QML} check box in \uicontrol {Debugger settings}
|
||||||
|
in \uicontrol Projects mode \uicontrol {Run Settings}.
|
||||||
|
|
||||||
\if defined(qtcreator)
|
\if defined(qtcreator)
|
||||||
|
\section2 Debugging Qt Quick Applications
|
||||||
|
|
||||||
To debug Qt Quick Applications:
|
To debug Qt Quick Applications:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li If you use qmake as the build system, make sure that
|
\li To create a build configuration that supports QML debugging,
|
||||||
debugging is enabled in the \uicontrol {Build Settings},
|
select \uicontrol {Projects} > \uicontrol {Build} >
|
||||||
\uicontrol {QML debugging and profiling} field, either
|
\uicontrol {QML debugging and profiling} > \uicontrol Enable.
|
||||||
explicitly for the project or globally by default.
|
|
||||||
|
|
||||||
\image qtcreator-projectpane.png "qmake general build settings pane"
|
\image qtcreator-build-settings-cmake-configure.webp {Build settings for a CMake project}
|
||||||
|
|
||||||
\note Debugging requires opening a socket at a TCP port,
|
\note Debugging requires opening a socket at a TCP port,
|
||||||
which presents a security risk. Anyone on the Internet could connect
|
which presents a security risk. Anyone on the Internet could connect
|
||||||
@@ -61,9 +65,9 @@
|
|||||||
functions. Therefore, you must make sure that the port is properly
|
functions. Therefore, you must make sure that the port is properly
|
||||||
protected by a firewall.
|
protected by a firewall.
|
||||||
|
|
||||||
\li In the \uicontrol {Run Settings}, \uicontrol {Debugger Settings} section, select
|
\li In \uicontrol {Run Settings} > \uicontrol {Debugger settings}, select
|
||||||
the \uicontrol {Enable QML} check box to enable
|
the \uicontrol {Enable QML} check box to enable QML debugging for
|
||||||
QML debugging.
|
running applications.
|
||||||
|
|
||||||
\li Select \uicontrol Build > \uicontrol {Rebuild Project} to clean and
|
\li Select \uicontrol Build > \uicontrol {Rebuild Project} to clean and
|
||||||
rebuild the project.
|
rebuild the project.
|
||||||
@@ -79,6 +83,43 @@
|
|||||||
automatically installed during \QC and Qt installation. Do not delete
|
automatically installed during \QC and Qt installation. Do not delete
|
||||||
them if you plan to debug QML applications.
|
them if you plan to debug QML applications.
|
||||||
|
|
||||||
|
\section2 Using Default Values
|
||||||
|
|
||||||
|
You can enable or disable QML debugging globally in \uicontrol Edit >
|
||||||
|
\uicontrol Preferences > \uicontrol {Build & Run} >
|
||||||
|
\uicontrol {Default Build Properties}.
|
||||||
|
|
||||||
|
\image qtcreator-build-settings-default.png "Default Build Properties tab in Build & Run Preferences"
|
||||||
|
|
||||||
|
The value of the \uicontrol {QML debugging} field determines what happens
|
||||||
|
when creating new build configurations. The values \uicontrol Enable
|
||||||
|
and \uicontrol Disable explicitly set QML debugging for the new build
|
||||||
|
configuration to that value, regardless of what type of build
|
||||||
|
configuration you create.
|
||||||
|
|
||||||
|
\uicontrol {Use Project Default} makes the values depend on the type of
|
||||||
|
build configuration: \uicontrol Debug, \uicontrol Profile, or
|
||||||
|
\uicontrol Release. When you use \l {CMake Build Configuration}{CMake} or
|
||||||
|
\l {qmake Build Configuration}{qmake} as a build system, debug and profile
|
||||||
|
build configurations have QML debugging enabled. However, release build
|
||||||
|
configurations do not include QML debugging because the debugging feature
|
||||||
|
makes applications vulnerable.
|
||||||
|
|
||||||
|
The \uicontrol {Leave at Default} option in \uicontrol {Projects} >
|
||||||
|
\uicontrol {Build} > \uicontrol {QML debugging and profiling} is needed to keep existing,
|
||||||
|
already configured CMake build directories intact. Also, it
|
||||||
|
enables you to import an existing build into \QC without enforced changes,
|
||||||
|
so that you don't have to worry about a complete rebuild of the project, for
|
||||||
|
example. Even if you later change the configuration of the build outside of
|
||||||
|
\QC, it will be kept as you want it.
|
||||||
|
|
||||||
|
There are some known issues in the interaction between the global setting
|
||||||
|
in \uicontrol Edit > \uicontrol Preferences > \uicontrol {Build & Run} >
|
||||||
|
\uicontrol {Default Build Properties} and the build configuration.
|
||||||
|
For example, for qmake the global setting only affects build configurations
|
||||||
|
that are automatically created when enabling a kit. Also, CMake ignores the
|
||||||
|
global setting.
|
||||||
|
|
||||||
\section1 Mixed C++/QML Debugging
|
\section1 Mixed C++/QML Debugging
|
||||||
|
|
||||||
To debug both the C++ and QML parts of your application at the same time,
|
To debug both the C++ and QML parts of your application at the same time,
|
||||||
@@ -87,7 +128,7 @@
|
|||||||
\uicontrol{Run Settings}.
|
\uicontrol{Run Settings}.
|
||||||
\endif
|
\endif
|
||||||
|
|
||||||
\image qtquick-debugging-settings.png
|
\image qtquick-debugging-settings.png {Debugger settings section in Run Settings}
|
||||||
|
|
||||||
\section1 Starting QML Debugging
|
\section1 Starting QML Debugging
|
||||||
|
|
||||||
|
|||||||
@@ -276,15 +276,19 @@ void FileSystemWatcher::addFiles(const QStringList &files, WatchMode wm)
|
|||||||
const int count = ++d->m_staticData->m_fileCount[file];
|
const int count = ++d->m_staticData->m_fileCount[file];
|
||||||
Q_ASSERT(count > 0);
|
Q_ASSERT(count > 0);
|
||||||
|
|
||||||
if (count == 1)
|
if (count == 1) {
|
||||||
toAdd << file;
|
toAdd << file;
|
||||||
|
|
||||||
const QString directory = QFileInfo(file).path();
|
QFileInfo fi(file);
|
||||||
const int dirCount = ++d->m_staticData->m_directoryCount[directory];
|
if (!fi.exists()) {
|
||||||
Q_ASSERT(dirCount > 0);
|
const QString directory = fi.path();
|
||||||
|
const int dirCount = ++d->m_staticData->m_directoryCount[directory];
|
||||||
|
Q_ASSERT(dirCount > 0);
|
||||||
|
|
||||||
if (dirCount == 1)
|
if (dirCount == 1)
|
||||||
toAdd << directory;
|
toAdd << directory;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!toAdd.isEmpty())
|
if (!toAdd.isEmpty())
|
||||||
@@ -312,15 +316,19 @@ void FileSystemWatcher::removeFiles(const QStringList &files)
|
|||||||
const int count = --(d->m_staticData->m_fileCount[file]);
|
const int count = --(d->m_staticData->m_fileCount[file]);
|
||||||
Q_ASSERT(count >= 0);
|
Q_ASSERT(count >= 0);
|
||||||
|
|
||||||
if (!count)
|
if (!count) {
|
||||||
toRemove << file;
|
toRemove << file;
|
||||||
|
|
||||||
const QString directory = QFileInfo(file).path();
|
QFileInfo fi(file);
|
||||||
const int dirCount = --d->m_staticData->m_directoryCount[directory];
|
if (!fi.exists()) {
|
||||||
Q_ASSERT(dirCount >= 0);
|
const QString directory = fi.path();
|
||||||
|
const int dirCount = --d->m_staticData->m_directoryCount[directory];
|
||||||
|
Q_ASSERT(dirCount >= 0);
|
||||||
|
|
||||||
if (!dirCount)
|
if (!dirCount)
|
||||||
toRemove << directory;
|
toRemove << directory;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!toRemove.isEmpty())
|
if (!toRemove.isEmpty())
|
||||||
@@ -419,13 +427,27 @@ QStringList FileSystemWatcher::directories() const
|
|||||||
void FileSystemWatcher::slotFileChanged(const QString &path)
|
void FileSystemWatcher::slotFileChanged(const QString &path)
|
||||||
{
|
{
|
||||||
const auto it = d->m_files.find(path);
|
const auto it = d->m_files.find(path);
|
||||||
|
QStringList toAdd;
|
||||||
if (it != d->m_files.end() && it.value().trigger(path)) {
|
if (it != d->m_files.end() && it.value().trigger(path)) {
|
||||||
qCDebug(fileSystemWatcherLog)
|
qCDebug(fileSystemWatcherLog)
|
||||||
<< this << "triggers on file" << it.key()
|
<< this << "triggers on file" << it.key()
|
||||||
<< it.value().watchMode
|
<< it.value().watchMode
|
||||||
<< it.value().modifiedTime.toString(Qt::ISODate);
|
<< it.value().modifiedTime.toString(Qt::ISODate);
|
||||||
d->fileChanged(path);
|
d->fileChanged(path);
|
||||||
|
|
||||||
|
QFileInfo fi(path);
|
||||||
|
if (!fi.exists()) {
|
||||||
|
const QString directory = fi.path();
|
||||||
|
const int dirCount = ++d->m_staticData->m_directoryCount[directory];
|
||||||
|
Q_ASSERT(dirCount > 0);
|
||||||
|
|
||||||
|
if (dirCount == 1)
|
||||||
|
toAdd << directory;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!toAdd.isEmpty())
|
||||||
|
d->m_staticData->m_watcher->addPaths(toAdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystemWatcher::slotDirectoryChanged(const QString &path)
|
void FileSystemWatcher::slotDirectoryChanged(const QString &path)
|
||||||
@@ -451,9 +473,20 @@ void FileSystemWatcher::slotDirectoryChanged(const QString &path)
|
|||||||
for (const QString &rejected : d->m_staticData->m_watcher->addPaths(toReadd))
|
for (const QString &rejected : d->m_staticData->m_watcher->addPaths(toReadd))
|
||||||
toReadd.removeOne(rejected);
|
toReadd.removeOne(rejected);
|
||||||
|
|
||||||
|
QStringList toRemove;
|
||||||
// If we've successfully added the file, that means it was deleted and replaced.
|
// If we've successfully added the file, that means it was deleted and replaced.
|
||||||
for (const QString &reAdded : std::as_const(toReadd))
|
for (const QString &reAdded : std::as_const(toReadd)) {
|
||||||
d->fileChanged(reAdded);
|
d->fileChanged(reAdded);
|
||||||
|
const QString directory = QFileInfo(reAdded).path();
|
||||||
|
const int dirCount = --d->m_staticData->m_directoryCount[directory];
|
||||||
|
Q_ASSERT(dirCount >= 0);
|
||||||
|
|
||||||
|
if (!dirCount)
|
||||||
|
toRemove << directory;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!toRemove.isEmpty())
|
||||||
|
d->m_staticData->m_watcher->removePaths(toRemove);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ ClangFormatConfigWidget::ClangFormatConfigWidget(TextEditor::ICodeStylePreferenc
|
|||||||
|
|
||||||
d->checksScrollArea->setWidget(d->checksWidget);
|
d->checksScrollArea->setWidget(d->checksWidget);
|
||||||
d->checksScrollArea->setWidgetResizable(true);
|
d->checksScrollArea->setWidgetResizable(true);
|
||||||
d->checksWidget->setEnabled(!codeStyle->isReadOnly()
|
d->checksWidget->setEnabled(!codeStyle->isReadOnly() && !codeStyle->isTemporarilyReadOnly()
|
||||||
&& !codeStyle->isTemporarilyReadOnly());
|
&& !codeStyle->isAdditionalTabDisabled());
|
||||||
|
|
||||||
FilePath fileName;
|
FilePath fileName;
|
||||||
if (d->project)
|
if (d->project)
|
||||||
@@ -140,8 +140,8 @@ void ClangFormatConfigWidget::slotCodeStyleChanged(
|
|||||||
d->config->setIsReadOnly(codeStyle->isReadOnly());
|
d->config->setIsReadOnly(codeStyle->isReadOnly());
|
||||||
d->style = d->config->style();
|
d->style = d->config->style();
|
||||||
|
|
||||||
d->checksWidget->setEnabled(!codeStyle->isReadOnly()
|
d->checksWidget->setEnabled(!codeStyle->isReadOnly() && !codeStyle->isTemporarilyReadOnly()
|
||||||
&& !codeStyle->isTemporarilyReadOnly());
|
&& !codeStyle->isAdditionalTabDisabled());
|
||||||
|
|
||||||
fillTable();
|
fillTable();
|
||||||
updatePreview();
|
updatePreview();
|
||||||
|
|||||||
@@ -156,9 +156,20 @@ void ClangFormatGlobalConfigWidget::initOverrideCheckBox()
|
|||||||
"can be overridden by the settings below."));
|
"can be overridden by the settings below."));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto setEnableOverrideCheckBox = [this](int index) {
|
auto setTemporarilyReadOnly = [this]() {
|
||||||
|
if (m_ignoreChanges.isLocked())
|
||||||
|
return;
|
||||||
|
Utils::GuardLocker locker(m_ignoreChanges);
|
||||||
|
m_codeStyle->currentPreferences()->setTemporarilyReadOnly(!m_overrideDefault->isChecked());
|
||||||
|
m_codeStyle->currentPreferences()->setIsAdditionalTabDisabled(!m_overrideDefault->isEnabled());
|
||||||
|
ClangFormatSettings::instance().write();
|
||||||
|
emit m_codeStyle->currentPreferencesChanged(m_codeStyle->currentPreferences());
|
||||||
|
};
|
||||||
|
|
||||||
|
auto setEnableOverrideCheckBox = [this, setTemporarilyReadOnly](int index) {
|
||||||
bool isDisable = index == static_cast<int>(ClangFormatSettings::Mode::Disable);
|
bool isDisable = index == static_cast<int>(ClangFormatSettings::Mode::Disable);
|
||||||
m_overrideDefault->setDisabled(isDisable);
|
m_overrideDefault->setDisabled(isDisable);
|
||||||
|
setTemporarilyReadOnly();
|
||||||
};
|
};
|
||||||
|
|
||||||
setEnableOverrideCheckBox(m_indentingOrFormatting->currentIndex());
|
setEnableOverrideCheckBox(m_indentingOrFormatting->currentIndex());
|
||||||
@@ -176,20 +187,19 @@ void ClangFormatGlobalConfigWidget::initOverrideCheckBox()
|
|||||||
".clang-format file."));
|
".clang-format file."));
|
||||||
|
|
||||||
m_overrideDefault->setChecked(getProjectOverriddenSettings(m_project));
|
m_overrideDefault->setChecked(getProjectOverriddenSettings(m_project));
|
||||||
m_codeStyle->currentPreferences()->setTemporarilyReadOnly(!m_overrideDefault->isChecked());
|
setTemporarilyReadOnly();
|
||||||
|
|
||||||
connect(m_overrideDefault, &QCheckBox::toggled, this, [this](bool checked) {
|
connect(m_overrideDefault, &QCheckBox::toggled, this, [this, setTemporarilyReadOnly](bool checked) {
|
||||||
if (m_project)
|
if (m_project)
|
||||||
m_project->setNamedSettings(Constants::OVERRIDE_FILE_ID, checked);
|
m_project->setNamedSettings(Constants::OVERRIDE_FILE_ID, checked);
|
||||||
else {
|
else
|
||||||
m_codeStyle->currentPreferences()->setTemporarilyReadOnly(!checked);
|
setTemporarilyReadOnly();
|
||||||
emit m_codeStyle->currentPreferencesChanged(m_codeStyle->currentPreferences());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_codeStyle, &TextEditor::ICodeStylePreferences::currentPreferencesChanged, this, [this] {
|
connect(m_codeStyle,
|
||||||
m_codeStyle->currentPreferences()->setTemporarilyReadOnly(!m_overrideDefault->isChecked());
|
&TextEditor::ICodeStylePreferences::currentPreferencesChanged,
|
||||||
});
|
this,
|
||||||
|
setTemporarilyReadOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include <cppeditor/cppcodestylesettingspage.h>
|
#include <cppeditor/cppcodestylesettingspage.h>
|
||||||
|
|
||||||
|
#include <utils/guard.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@@ -40,6 +42,7 @@ private:
|
|||||||
|
|
||||||
ProjectExplorer::Project *m_project;
|
ProjectExplorer::Project *m_project;
|
||||||
TextEditor::ICodeStylePreferences *m_codeStyle;
|
TextEditor::ICodeStylePreferences *m_codeStyle;
|
||||||
|
Utils::Guard m_ignoreChanges;
|
||||||
|
|
||||||
QLabel *m_projectHasClangFormat;
|
QLabel *m_projectHasClangFormat;
|
||||||
QLabel *m_formattingModeLabel;
|
QLabel *m_formattingModeLabel;
|
||||||
|
|||||||
@@ -213,10 +213,14 @@ bool getCurrentOverriddenSettings(const Utils::FilePath &filePath)
|
|||||||
const ProjectExplorer::Project *project = ProjectExplorer::ProjectManager::projectForFile(
|
const ProjectExplorer::Project *project = ProjectExplorer::ProjectManager::projectForFile(
|
||||||
filePath);
|
filePath);
|
||||||
|
|
||||||
return getProjectUseGlobalSettings(project) ? !TextEditor::TextEditorSettings::codeStyle("Cpp")
|
return getProjectUseGlobalSettings(project)
|
||||||
->currentPreferences()
|
? !TextEditor::TextEditorSettings::codeStyle("Cpp")
|
||||||
->isTemporarilyReadOnly()
|
->currentPreferences()
|
||||||
: getProjectOverriddenSettings(project);
|
->isTemporarilyReadOnly()
|
||||||
|
&& !TextEditor::TextEditorSettings::codeStyle("Cpp")
|
||||||
|
->currentPreferences()
|
||||||
|
->isAdditionalTabDisabled()
|
||||||
|
: getProjectOverriddenSettings(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClangFormatSettings::Mode getProjectIndentationOrFormattingSettings(
|
ClangFormatSettings::Mode getProjectIndentationOrFormattingSettings(
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ public:
|
|||||||
Utils::Id id() const { return m_id; }
|
Utils::Id id() const { return m_id; }
|
||||||
QVariantMap toMap () const;
|
QVariantMap toMap () const;
|
||||||
|
|
||||||
|
void setAutorun(bool autoRun) { m_isAutoRun = autoRun; }
|
||||||
|
|
||||||
void setFilePath(const Utils::FilePath &executable);
|
void setFilePath(const Utils::FilePath &executable);
|
||||||
Utils::FilePath filePath() const;
|
Utils::FilePath filePath() const;
|
||||||
Utils::FilePath cmakeExecutable() const;
|
Utils::FilePath cmakeExecutable() const;
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ void CMakeToolManager::restoreCMakeTools()
|
|||||||
emit m_instance->cmakeToolsLoaded();
|
emit m_instance->cmakeToolsLoaded();
|
||||||
|
|
||||||
// Store the default CMake tool "Autorun CMake" value globally
|
// Store the default CMake tool "Autorun CMake" value globally
|
||||||
|
// TODO: Remove in Qt Creator 13
|
||||||
auto settings = Internal::CMakeSpecificSettings::instance();
|
auto settings = Internal::CMakeSpecificSettings::instance();
|
||||||
if (settings->autorunCMake.value() == settings->autorunCMake.defaultValue()) {
|
if (settings->autorunCMake.value() == settings->autorunCMake.defaultValue()) {
|
||||||
CMakeTool *cmake = defaultCMakeTool();
|
CMakeTool *cmake = defaultCMakeTool();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "cmaketoolsettingsaccessor.h"
|
#include "cmaketoolsettingsaccessor.h"
|
||||||
|
|
||||||
#include "cmakeprojectmanagertr.h"
|
#include "cmakeprojectmanagertr.h"
|
||||||
|
#include "cmakespecificsettings.h"
|
||||||
#include "cmaketool.h"
|
#include "cmaketool.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
@@ -184,9 +185,14 @@ void CMakeToolSettingsAccessor::saveCMakeTools(const QList<CMakeTool *> &cmakeTo
|
|||||||
data.insert(QLatin1String(CMAKE_TOOL_DEFAULT_KEY), defaultId.toSetting());
|
data.insert(QLatin1String(CMAKE_TOOL_DEFAULT_KEY), defaultId.toSetting());
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (const CMakeTool *item : cmakeTools) {
|
for (CMakeTool *item : cmakeTools) {
|
||||||
Utils::FilePath fi = item->cmakeExecutable();
|
Utils::FilePath fi = item->cmakeExecutable();
|
||||||
|
|
||||||
|
// Gobal Autorun value will be set for all tools
|
||||||
|
// TODO: Remove in Qt Creator 13
|
||||||
|
const auto settings = CMakeSpecificSettings::instance();
|
||||||
|
item->setAutorun(settings->autorunCMake.value());
|
||||||
|
|
||||||
if (fi.needsDevice() || fi.isExecutableFile()) { // be graceful for device related stuff
|
if (fi.needsDevice() || fi.isExecutableFile()) { // be graceful for device related stuff
|
||||||
QVariantMap tmp = item->toMap();
|
QVariantMap tmp = item->toMap();
|
||||||
if (tmp.isEmpty())
|
if (tmp.isEmpty())
|
||||||
|
|||||||
@@ -426,7 +426,8 @@ void CppCodeStylePreferencesWidget::setCodeStyleSettings(const CppCodeStyleSetti
|
|||||||
|
|
||||||
void CppCodeStylePreferencesWidget::slotCurrentPreferencesChanged(ICodeStylePreferences *preferences, bool preview)
|
void CppCodeStylePreferencesWidget::slotCurrentPreferencesChanged(ICodeStylePreferences *preferences, bool preview)
|
||||||
{
|
{
|
||||||
const bool enable = !preferences->isReadOnly() && !preferences->isTemporarilyReadOnly();
|
const bool enable = !preferences->isReadOnly() && (!preferences->isTemporarilyReadOnly()
|
||||||
|
|| preferences->isAdditionalTabDisabled());
|
||||||
for (QWidget *widget : d->m_controllers)
|
for (QWidget *widget : d->m_controllers)
|
||||||
widget->setEnabled(enable);
|
widget->setEnabled(enable);
|
||||||
|
|
||||||
|
|||||||
@@ -3827,6 +3827,7 @@ public:
|
|||||||
GenerateProperty = 1 << 5,
|
GenerateProperty = 1 << 5,
|
||||||
GenerateConstantProperty = 1 << 6,
|
GenerateConstantProperty = 1 << 6,
|
||||||
HaveExistingQProperty = 1 << 7,
|
HaveExistingQProperty = 1 << 7,
|
||||||
|
Invalid = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
GenerateGetterSetterOp(const CppQuickFixInterface &interface,
|
GenerateGetterSetterOp(const CppQuickFixInterface &interface,
|
||||||
@@ -4524,7 +4525,7 @@ public:
|
|||||||
};
|
};
|
||||||
using Flag = GenerateGetterSetterOp::GenerateFlag;
|
using Flag = GenerateGetterSetterOp::GenerateFlag;
|
||||||
constexpr static Flag ColumnFlag[] = {
|
constexpr static Flag ColumnFlag[] = {
|
||||||
static_cast<Flag>(-1),
|
Flag::Invalid,
|
||||||
Flag::GenerateGetter,
|
Flag::GenerateGetter,
|
||||||
Flag::GenerateSetter,
|
Flag::GenerateSetter,
|
||||||
Flag::GenerateSignal,
|
Flag::GenerateSignal,
|
||||||
|
|||||||
@@ -266,9 +266,20 @@ public:
|
|||||||
|
|
||||||
void expandNode(const QModelIndex &idx)
|
void expandNode(const QModelIndex &idx)
|
||||||
{
|
{
|
||||||
|
if (!m_engine)
|
||||||
|
return;
|
||||||
|
|
||||||
m_expandedINames.insert(idx.data(LocalsINameRole).toString());
|
m_expandedINames.insert(idx.data(LocalsINameRole).toString());
|
||||||
if (canFetchMore(idx))
|
if (canFetchMore(idx)) {
|
||||||
fetchMore(idx);
|
if (!idx.isValid())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (auto item = dynamic_cast<ToolTipWatchItem *>(itemForIndex(idx))) {
|
||||||
|
WatchItem *it = m_engine->watchHandler()->findItem(item->iname);
|
||||||
|
if (QTC_GUARD(it))
|
||||||
|
it->model()->fetchMore(it->index());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void collapseNode(const QModelIndex &idx)
|
void collapseNode(const QModelIndex &idx)
|
||||||
@@ -276,22 +287,6 @@ public:
|
|||||||
m_expandedINames.remove(idx.data(LocalsINameRole).toString());
|
m_expandedINames.remove(idx.data(LocalsINameRole).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void fetchMore(const QModelIndex &idx) override
|
|
||||||
{
|
|
||||||
if (!idx.isValid())
|
|
||||||
return;
|
|
||||||
auto item = dynamic_cast<ToolTipWatchItem *>(itemForIndex(idx));
|
|
||||||
if (!item)
|
|
||||||
return;
|
|
||||||
QString iname = item->iname;
|
|
||||||
if (!m_engine)
|
|
||||||
return;
|
|
||||||
|
|
||||||
WatchItem *it = m_engine->watchHandler()->findItem(iname);
|
|
||||||
QTC_ASSERT(it, return);
|
|
||||||
it->model()->fetchMore(it->index());
|
|
||||||
}
|
|
||||||
|
|
||||||
void restoreTreeModel(QXmlStreamReader &r);
|
void restoreTreeModel(QXmlStreamReader &r);
|
||||||
|
|
||||||
QPointer<DebuggerEngine> m_engine;
|
QPointer<DebuggerEngine> m_engine;
|
||||||
|
|||||||
@@ -38,12 +38,6 @@ using namespace Utils;
|
|||||||
|
|
||||||
namespace Debugger::Internal {
|
namespace Debugger::Internal {
|
||||||
|
|
||||||
static QString currentError()
|
|
||||||
{
|
|
||||||
int err = errno;
|
|
||||||
return QString::fromLatin1(strerror(err));
|
|
||||||
}
|
|
||||||
|
|
||||||
Terminal::Terminal(QObject *parent)
|
Terminal::Terminal(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{
|
||||||
@@ -52,6 +46,10 @@ Terminal::Terminal(QObject *parent)
|
|||||||
void Terminal::setup()
|
void Terminal::setup()
|
||||||
{
|
{
|
||||||
#ifdef DEBUGGER_USE_TERMINAL
|
#ifdef DEBUGGER_USE_TERMINAL
|
||||||
|
const auto currentError = [] {
|
||||||
|
int err = errno;
|
||||||
|
return QString::fromLatin1(strerror(err));
|
||||||
|
};
|
||||||
if (!qtcEnvironmentVariableIsSet("QTC_USE_PTY"))
|
if (!qtcEnvironmentVariableIsSet("QTC_USE_PTY"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ public:
|
|||||||
QString m_displayName;
|
QString m_displayName;
|
||||||
bool m_readOnly = false;
|
bool m_readOnly = false;
|
||||||
bool m_temporarilyReadOnly = false;
|
bool m_temporarilyReadOnly = false;
|
||||||
|
bool m_isAdditionalTabDisabled = false;
|
||||||
QString m_settingsSuffix;
|
QString m_settingsSuffix;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -82,6 +83,16 @@ bool ICodeStylePreferences::isTemporarilyReadOnly() const
|
|||||||
return d->m_temporarilyReadOnly;
|
return d->m_temporarilyReadOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ICodeStylePreferences::isAdditionalTabDisabled() const
|
||||||
|
{
|
||||||
|
return d->m_isAdditionalTabDisabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ICodeStylePreferences::setIsAdditionalTabDisabled(bool on)
|
||||||
|
{
|
||||||
|
d->m_isAdditionalTabDisabled = on;
|
||||||
|
}
|
||||||
|
|
||||||
void ICodeStylePreferences::setTabSettings(const TabSettings &settings)
|
void ICodeStylePreferences::setTabSettings(const TabSettings &settings)
|
||||||
{
|
{
|
||||||
if (d->m_tabSettings == settings)
|
if (d->m_tabSettings == settings)
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ public:
|
|||||||
bool isTemporarilyReadOnly() const;
|
bool isTemporarilyReadOnly() const;
|
||||||
void setTemporarilyReadOnly(bool on);
|
void setTemporarilyReadOnly(bool on);
|
||||||
|
|
||||||
|
bool isAdditionalTabDisabled() const;
|
||||||
|
void setIsAdditionalTabDisabled(bool on);
|
||||||
|
|
||||||
void setTabSettings(const TabSettings &settings);
|
void setTabSettings(const TabSettings &settings);
|
||||||
TabSettings tabSettings() const;
|
TabSettings tabSettings() const;
|
||||||
TabSettings currentTabSettings() const;
|
TabSettings currentTabSettings() const;
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ def __createProjectHandleQtQuickSelection__(minimumQtVersion):
|
|||||||
selectFromCombo(comboBox, minimumQtVersion)
|
selectFromCombo(comboBox, minimumQtVersion)
|
||||||
except:
|
except:
|
||||||
t,v = sys.exc_info()[:2]
|
t,v = sys.exc_info()[:2]
|
||||||
test.fatal("Exception while trying to select Qt version", "%s :%s" % (t.__name__, str(v)))
|
test.fatal("Exception while trying to select Qt version", "%s: %s" % (t.__name__, str(v)))
|
||||||
clickButton(waitForObject(":Next_QPushButton"))
|
clickButton(waitForObject(":Next_QPushButton"))
|
||||||
return minimumQtVersion
|
return minimumQtVersion
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ import subprocess;
|
|||||||
import sys
|
import sys
|
||||||
import errno;
|
import errno;
|
||||||
from datetime import datetime,timedelta;
|
from datetime import datetime,timedelta;
|
||||||
try:
|
if sys.version_info.major > 2:
|
||||||
import __builtin__ # Python 2
|
import builtins as __builtin__
|
||||||
except ImportError:
|
else:
|
||||||
import builtins as __builtin__ # Python 3
|
import __builtin__
|
||||||
|
|
||||||
|
|
||||||
srcPath = ''
|
srcPath = ''
|
||||||
@@ -382,6 +382,7 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]):
|
|||||||
substituteUnchosenTargetABIs(tmpSettingsDir)
|
substituteUnchosenTargetABIs(tmpSettingsDir)
|
||||||
SettingsPath = ['-settingspath', '"%s"' % tmpSettingsDir]
|
SettingsPath = ['-settingspath', '"%s"' % tmpSettingsDir]
|
||||||
|
|
||||||
|
test.log("Test is running on Python %s" % sys.version)
|
||||||
# current dir is directory holding qtcreator.py
|
# current dir is directory holding qtcreator.py
|
||||||
origSettingsDir = os.path.abspath(os.path.join(os.getcwd(), "..", "..", "settings"))
|
origSettingsDir = os.path.abspath(os.path.join(os.getcwd(), "..", "..", "settings"))
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ def checkQtCreatorHelpVersion(expectedVersion):
|
|||||||
helpContentWidget = waitForObject(':Qt Creator_QHelpContentWidget', 5000)
|
helpContentWidget = waitForObject(':Qt Creator_QHelpContentWidget', 5000)
|
||||||
waitFor("any(map(rightStart, dumpItems(helpContentWidget.model())))", 10000)
|
waitFor("any(map(rightStart, dumpItems(helpContentWidget.model())))", 10000)
|
||||||
items = dumpItems(helpContentWidget.model())
|
items = dumpItems(helpContentWidget.model())
|
||||||
test.compare(filter(rightStart, items)[0],
|
test.compare(list(filter(rightStart, items))[0],
|
||||||
'Qt Creator Manual %s' % expectedVersion,
|
'Qt Creator Manual %s' % expectedVersion,
|
||||||
'Verifying whether manual uses expected version.')
|
'Verifying whether manual uses expected version.')
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user