forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.3'
Change-Id: I56004e3ec9dc9d92d33bdae438c4f7e069eccc45
This commit is contained in:
6
dist/changes-4.3.0.md
vendored
6
dist/changes-4.3.0.md
vendored
@@ -13,6 +13,8 @@ General
|
||||
(experimental `SilverSearcher` plugin)
|
||||
* Added exclusion patterns to `Advanced Find` and custom locator filters
|
||||
* Added navigation pane on right side of edit mode
|
||||
* Removed dependency of Welcome mode on OpenGL, improving experience in
|
||||
virtual machine environments and certain setups (QTCREATORBUG-15727)
|
||||
* Fixed wrong UI colors after suspend (QTCREATORBUG-14929)
|
||||
* Fixed crash with invalid themes (QTCREATORBUG-17517)
|
||||
|
||||
@@ -133,8 +135,8 @@ Version Control Systems
|
||||
* Added option to sign-off commits
|
||||
* Fixed handling of already merged files in merge tool
|
||||
* Gerrit
|
||||
* Added detection of Gerrit remotes (SSH only)
|
||||
* Added support for accessing Gerrit via HTTP(S)
|
||||
* Added detection of Gerrit remotes
|
||||
* Added support for accessing Gerrit via REST API over HTTP(S)
|
||||
|
||||
Test Integration
|
||||
|
||||
|
||||
31
dist/changes-4.3.1.md
vendored
Normal file
31
dist/changes-4.3.1.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
Qt Creator version 4.3.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:
|
||||
|
||||
git clone git://code.qt.io/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline v4.3.0..v4.3.1
|
||||
|
||||
Version Control Systems
|
||||
|
||||
* Git
|
||||
* Fixed that ref names were missing for `Show`
|
||||
* Gerrit
|
||||
* Fixed parsing output from Gerrit 2.14
|
||||
|
||||
Platform Specific
|
||||
|
||||
Windows
|
||||
|
||||
* Fixed checking whether example should be copied to writable location
|
||||
(QTCREATORBUG-18184)
|
||||
|
||||
WinRT
|
||||
|
||||
* Fixed running MSVC 2017 based applications (QTCREATORBUG-18288)
|
||||
|
||||
iOS
|
||||
|
||||
* Fixed crash that could occur at startup while device is connected
|
||||
(QTCREATORBUG-18226)
|
||||
BIN
doc/images/qtcreator-build-settings-ios.png
Normal file
BIN
doc/images/qtcreator-build-settings-ios.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 91 KiB |
@@ -49,7 +49,7 @@
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol {Other Project} > \uicontrol {Auto Test} >
|
||||
\uicontrol {Other Project} > \uicontrol {Auto Test Project} >
|
||||
\uicontrol Choose to create a project with boilerplate code for a
|
||||
Qt test.
|
||||
|
||||
@@ -76,10 +76,9 @@
|
||||
executed by the testing framework to initialize and clean
|
||||
up the test.
|
||||
|
||||
\li In the \uicontrol {Build auto tests} field, select
|
||||
\uicontrol Always to always build the test when building
|
||||
the project or \uicontrol {Debug Only} to only build it
|
||||
during debug builds.
|
||||
\li In the \uicontrol {Build system} field, select the build
|
||||
system to use for building the project: qmake, CMake, or
|
||||
Qbs.
|
||||
|
||||
\endlist
|
||||
|
||||
@@ -95,7 +94,7 @@
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol {Other Project} > \uicontrol {Auto Test} >
|
||||
\uicontrol {Other Project} > \uicontrol {Auto Test Project} >
|
||||
\uicontrol Choose to create a project with boilerplate code for a
|
||||
Google test.
|
||||
|
||||
@@ -116,11 +115,6 @@
|
||||
\li Select the \uicontrol {Enable C++ 11} check box to
|
||||
support C++ 11 features in the test.
|
||||
|
||||
\li In the \uicontrol {Build auto tests} field, select
|
||||
\uicontrol Always to always build the test when building
|
||||
the project or \uicontrol {Debug Only} to only build it
|
||||
during debug builds.
|
||||
|
||||
\li In the \uicontrol {Google test repository} field, select
|
||||
a directory that contains a clone of the googletest
|
||||
repository.
|
||||
@@ -128,6 +122,10 @@
|
||||
To use an installed Google C++ Testing framework instead,
|
||||
see \l{Setting Up the Google C++ Testing Framework}.
|
||||
|
||||
\li In the \uicontrol {Build system} field, select the build
|
||||
system to use for building the project: qmake, CMake, or
|
||||
Qbs.
|
||||
|
||||
\endlist
|
||||
|
||||
\endlist
|
||||
|
||||
@@ -89,6 +89,13 @@
|
||||
|
||||
\image qtcreator-ios-add-kit.png "Build & Run Settings"
|
||||
|
||||
\li In \uicontrol {iOS Settings}, select the development team to use
|
||||
for signing and provisioning applications. You must configure
|
||||
development teams and provisioning profiles in Xcode using an
|
||||
Apple developer account.
|
||||
|
||||
\image qtcreator-build-settings-ios.png "iOS build settings"
|
||||
|
||||
\endlist
|
||||
|
||||
\li Select \uicontrol Run to specify run settings.
|
||||
|
||||
@@ -3161,6 +3161,14 @@ class DumperBase:
|
||||
return val
|
||||
error('BAD DATA TO ADD TO: %s %s' % (self.type, other))
|
||||
|
||||
def __sub__(self, other):
|
||||
self.check()
|
||||
if self.type.name == other.type.name:
|
||||
stripped = self.type.stripTypedefs()
|
||||
if stripped.code == TypeCodePointer:
|
||||
return (self.pointer() - other.pointer()) // stripped.dereference().size()
|
||||
error('BAD DATA TO SUB TO: %s %s' % (self.type, other))
|
||||
|
||||
def dereference(self):
|
||||
self.check()
|
||||
if self.type.code == TypeCodeTypedef:
|
||||
|
||||
@@ -413,7 +413,7 @@ class Dumper(DumperBase):
|
||||
return '%d' % intval
|
||||
|
||||
def nativeTypeId(self, nativeType):
|
||||
if nativeType.code == gdb.TYPE_CODE_TYPEDEF:
|
||||
if nativeType and (nativeType.code == gdb.TYPE_CODE_TYPEDEF):
|
||||
return '%s{%s}' % (nativeType, nativeType.strip_typedefs())
|
||||
name = str(nativeType)
|
||||
if len(name) == 0:
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
||||
{ "key": "UiSupport", "value": "%{JS: '%{QtQuickVersion}' !== '2.3' }" },
|
||||
{ "key": "IsUiFileInUse", "value": "%{JS: %{UiSupport} && %{QmlUiSplit} }" },
|
||||
{ "key": "UseVirtualKeyboard", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0}" }
|
||||
{ "key": "UseVirtualKeyboard", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0 || [ %{Plugins} ].indexOf('Boot2QtQdb') >= 0}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
{ "key": "QtQuickDialogsVersion", "value": "1.0" },
|
||||
{ "key": "QtQuickLayoutsVersion", "value": "1.3" },
|
||||
{ "key": "QtQuickVirtualKeyboardVersion", "value": "2.1" },
|
||||
{ "key": "UseVirtualKeyboard", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0}" }
|
||||
{ "key": "UseVirtualKeyboard", "value": "%{JS: [ %{Plugins} ].indexOf('Boot2Qt') >= 0 || [ %{Plugins} ].indexOf('Boot2QtQdb') >= 0}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
|
||||
2
src/libs/3rdparty/cplusplus/Symbols.h
vendored
2
src/libs/3rdparty/cplusplus/Symbols.h
vendored
@@ -503,7 +503,7 @@ protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
|
||||
private:
|
||||
bool _isVariadic;
|
||||
bool _isVariadic = false;
|
||||
bool _isVirtual;
|
||||
FullySpecifiedType _type;
|
||||
};
|
||||
|
||||
@@ -38,5 +38,11 @@ win32:SUBDIRS += utils/process_ctrlc_stub.pro
|
||||
# Windows: Compile Qt Creator CDB extension if Debugging tools can be detected.
|
||||
win32: isEmpty(QTC_SKIP_CDBEXT) {
|
||||
include(qtcreatorcdbext/cdb_detect.pri)
|
||||
exists($$CDB_PATH):SUBDIRS += qtcreatorcdbext
|
||||
exists($$CDB_PATH) {
|
||||
SUBDIRS += qtcreatorcdbext
|
||||
} else {
|
||||
message("Compiling Qt Creator without a CDB extension.")
|
||||
message("If CDB is installed in a none default path define a CDB_PATH")
|
||||
message("environment variable pointing to your CDB installation.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <dbghelp.h>
|
||||
#endif
|
||||
|
||||
#include <regex>
|
||||
|
||||
constexpr bool debugPyType = false;
|
||||
constexpr bool debuggingTypeEnabled() { return debugPyType || debugPyCdbextModule; }
|
||||
|
||||
@@ -289,6 +291,9 @@ int PyType::code() const
|
||||
if (FAILED(ExtensionCommandContext::instance()->symbols()->CreateSymbolGroup2(&sg)))
|
||||
return TypeCodeStruct;
|
||||
|
||||
if (knownType(name(), 0) != KT_Unknown)
|
||||
return TypeCodeStruct;
|
||||
|
||||
const std::string helperValueName = SymbolGroupValue::pointedToSymbolName(0, name(true));
|
||||
ULONG index = DEBUG_ANY_ID;
|
||||
if (SUCCEEDED(sg->AddSymbol(helperValueName.c_str(), &index)))
|
||||
@@ -411,6 +416,10 @@ PyType PyType::lookupType(const std::string &typeNameIn, ULONG64 module)
|
||||
if (typeName == "__int64" || typeName == "unsigned __int64")
|
||||
typeName.erase(typeName.find("__"), 2);
|
||||
|
||||
const static std::regex typeNameRE("^[a-zA-Z_][a-zA-Z0-9_]*!?[a-zA-Z0-9_<>:, \\*\\&\\[\\]]*$");
|
||||
if (!std::regex_match(typeName, typeNameRE))
|
||||
return PyType();
|
||||
|
||||
CIDebugSymbols *symbols = ExtensionCommandContext::instance()->symbols();
|
||||
ULONG typeId;
|
||||
HRESULT result = S_FALSE;
|
||||
|
||||
@@ -138,6 +138,8 @@ exists($$PYTHON_INSTALL_DIR) {
|
||||
CONFIG(release, debug|release): deploy_python.recurse = Release
|
||||
CONFIG(debug, debug|release): deploy_python.recurse = Debug
|
||||
QMAKE_EXTRA_TARGETS += deploy_python
|
||||
} else {
|
||||
message("Set PYTHON_INSTALL_DIR pointing to Python 3.5 or greater to enable the python dumpers for cdb.")
|
||||
}
|
||||
|
||||
target.path = $$QTC_PREFIX/lib/$${DIRNAME} # TODO this should go to INSTALL_LIBRARY_PATH/$${DIRNAME}
|
||||
|
||||
@@ -49,6 +49,11 @@ class QWidget;
|
||||
|
||||
QTCREATOR_UTILS_EXPORT QDebug operator<<(QDebug dbg, const Utils::FileName &c);
|
||||
|
||||
// for withNTFSPermissions
|
||||
#ifdef Q_OS_WIN
|
||||
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Utils {
|
||||
@@ -121,6 +126,28 @@ public:
|
||||
static QString resolvePath(const QString &baseDir, const QString &fileName);
|
||||
};
|
||||
|
||||
// for actually finding out if e.g. directories are writable on Windows
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
template <typename T>
|
||||
static T withNTFSPermissions(const std::function<T()> &task)
|
||||
{
|
||||
qt_ntfs_permission_lookup++;
|
||||
T result = task();
|
||||
qt_ntfs_permission_lookup--;
|
||||
return result;
|
||||
}
|
||||
|
||||
#else // Q_OS_WIN
|
||||
|
||||
template <typename T>
|
||||
static T withNTFSPermissions(const std::function<T()> &task)
|
||||
{
|
||||
return task();
|
||||
}
|
||||
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT FileReader
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Utils::FileUtils) // sic!
|
||||
|
||||
@@ -100,18 +100,21 @@ namespace {
|
||||
const QLatin1String ArmToolchainPrefix("arm-linux-androideabi");
|
||||
const QLatin1String X86ToolchainPrefix("x86");
|
||||
const QLatin1String MipsToolchainPrefix("mipsel-linux-android");
|
||||
const QLatin1String Mips64ToolchainPrefix("mips64el-linux-android");
|
||||
const QLatin1String AArch64ToolchainPrefix("aarch64-linux-android");
|
||||
const QLatin1String X86_64ToolchainPrefix("x86_64");
|
||||
|
||||
const QLatin1String ArmToolsPrefix("arm-linux-androideabi");
|
||||
const QLatin1String X86ToolsPrefix("i686-linux-android");
|
||||
const QLatin1String MipsToolsPrefix("mipsel-linux-android");
|
||||
const QLatin1String Mips64ToolsPrefix("mips64el-linux-android");
|
||||
const QLatin1String AArch64ToolsPrefix("aarch64-linux-android");
|
||||
const QLatin1String X86_64ToolsPrefix("x86_64-linux-android");
|
||||
|
||||
const QLatin1String ArmToolsDisplayName("arm");
|
||||
const QLatin1String X86ToolsDisplayName("i686");
|
||||
const QLatin1String MipsToolsDisplayName("mipsel");
|
||||
const QLatin1String Mips64ToolsDisplayName("mips64el");
|
||||
const QLatin1String AArch64ToolsDisplayName("aarch64");
|
||||
const QLatin1String X86_64ToolsDisplayName("x86_64");
|
||||
|
||||
@@ -172,6 +175,9 @@ Abi AndroidConfig::abiForToolChainPrefix(const QString &toolchainPrefix)
|
||||
} else if (toolchainPrefix == X86_64ToolchainPrefix) {
|
||||
arch = Abi::X86Architecture;
|
||||
wordWidth = 64;
|
||||
} else if (toolchainPrefix == Mips64ToolchainPrefix) {
|
||||
arch = Abi::MipsArchitecture;
|
||||
wordWidth = 64;
|
||||
}
|
||||
|
||||
return Abi(arch, Abi::LinuxOS, Abi::AndroidLinuxFlavor, Abi::ElfFormat, wordWidth);
|
||||
@@ -189,6 +195,8 @@ QLatin1String AndroidConfig::toolchainPrefix(const Abi &abi)
|
||||
return X86_64ToolchainPrefix;
|
||||
return X86ToolchainPrefix;
|
||||
case Abi::MipsArchitecture:
|
||||
if (abi.wordWidth() == 64)
|
||||
return Mips64ToolchainPrefix;
|
||||
return MipsToolchainPrefix;
|
||||
default:
|
||||
return Unknown;
|
||||
@@ -207,6 +215,8 @@ QLatin1String AndroidConfig::toolsPrefix(const Abi &abi)
|
||||
return X86_64ToolsPrefix;
|
||||
return X86ToolsPrefix;
|
||||
case Abi::MipsArchitecture:
|
||||
if (abi.wordWidth() == 64)
|
||||
return Mips64ToolsPrefix;
|
||||
return MipsToolsPrefix;
|
||||
default:
|
||||
return Unknown;
|
||||
@@ -225,6 +235,8 @@ QLatin1String AndroidConfig::displayName(const Abi &abi)
|
||||
return X86_64ToolsDisplayName;
|
||||
return X86ToolsDisplayName;
|
||||
case Abi::MipsArchitecture:
|
||||
if (abi.wordWidth() == 64)
|
||||
return Mips64ToolsDisplayName;
|
||||
return MipsToolsDisplayName;
|
||||
default:
|
||||
return Unknown;
|
||||
|
||||
@@ -311,7 +311,7 @@ QList<AndroidToolChainFactory::AndroidToolChainInformation> AndroidToolChainFact
|
||||
ati.version = fileName.mid(idx + 1);
|
||||
QString platform = fileName.left(idx);
|
||||
ati.abi = AndroidConfig::abiForToolChainPrefix(platform);
|
||||
if (ati.abi.architecture() == Abi::UnknownArchitecture) // e.g. mipsel which is not yet supported
|
||||
if (ati.abi.architecture() == Abi::UnknownArchitecture)
|
||||
continue;
|
||||
ati.compilerCommand = AndroidConfigurations::currentConfig().gccPath(ati.abi, lang, ati.version);
|
||||
result.append(ati);
|
||||
@@ -399,7 +399,7 @@ AndroidToolChainFactory::autodetectToolChainsForNdk(const FileName &ndkPath,
|
||||
QString version = fileName.mid(idx + 1);
|
||||
QString platform = fileName.left(idx);
|
||||
Abi abi = AndroidConfig::abiForToolChainPrefix(platform);
|
||||
if (abi.architecture() == Abi::UnknownArchitecture) // e.g. mipsel which is not yet supported
|
||||
if (abi.architecture() == Abi::UnknownArchitecture)
|
||||
continue;
|
||||
QList<AndroidToolChain *> toolChainBundle;
|
||||
for (Core::Id lang : {ProjectExplorer::Constants::CXX_LANGUAGE_ID, ProjectExplorer::Constants::C_LANGUAGE_ID}) {
|
||||
@@ -447,7 +447,7 @@ QList<int> AndroidToolChainFactory::newestToolChainVersionForArch(const Abi &abi
|
||||
QList<int> version = versionNumberFromString(fileName.mid(idx + 1));
|
||||
QString platform = fileName.left(idx);
|
||||
Abi abi = AndroidConfig::abiForToolChainPrefix(platform);
|
||||
if (abi.architecture() == Abi::UnknownArchitecture) // e.g. mipsel which is not yet supported
|
||||
if (abi.architecture() == Abi::UnknownArchitecture)
|
||||
continue;
|
||||
QHash<Abi, QList<int> >::const_iterator it
|
||||
= m_newestVersionForAbi.constFind(abi);
|
||||
|
||||
@@ -45,10 +45,12 @@ AvdDialog::AvdDialog(int minApiLevel, const QString &targetArch, const AndroidCo
|
||||
m_hideTipTimer.setInterval(2000);
|
||||
m_hideTipTimer.setSingleShot(true);
|
||||
|
||||
if (targetArch.isEmpty())
|
||||
m_avdDialog.abiComboBox->addItems(QStringList({"armeabi-v7a", "armeabi", "x86", "mips"}));
|
||||
else
|
||||
if (targetArch.isEmpty()) {
|
||||
m_avdDialog.abiComboBox->addItems(QStringList({"armeabi-v7a", "armeabi", "x86", "mips",
|
||||
"arm64-v8a", "x86_64", "mips64"}));
|
||||
} else {
|
||||
m_avdDialog.abiComboBox->addItems(QStringList(targetArch));
|
||||
}
|
||||
|
||||
QRegExpValidator *v = new QRegExpValidator(m_allowedNameChars, this);
|
||||
m_avdDialog.nameLineEdit->setValidator(v);
|
||||
|
||||
@@ -279,11 +279,20 @@ QString CMakeGeneratorKitConfigWidget::toolTip() const
|
||||
void CMakeGeneratorKitConfigWidget::changeGenerator()
|
||||
{
|
||||
QPointer<QDialog> changeDialog = new QDialog(m_changeButton);
|
||||
|
||||
// Disable help button in titlebar on windows:
|
||||
Qt::WindowFlags flags = changeDialog->windowFlags();
|
||||
flags &= ~Qt::WindowContextHelpButtonHint;
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
changeDialog->setWindowFlags(flags);
|
||||
|
||||
changeDialog->setWindowTitle(tr("CMake Generator"));
|
||||
|
||||
auto *layout = new QGridLayout(changeDialog);
|
||||
layout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
auto *cmakeLabel = new QLabel;
|
||||
cmakeLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
|
||||
|
||||
auto *generatorCombo = new QComboBox;
|
||||
auto *extraGeneratorCombo = new QComboBox;
|
||||
|
||||
@@ -157,6 +157,7 @@ SearchResultWidget::SearchResultWidget(QWidget *parent) :
|
||||
m_label = new QLabel(m_descriptionContainer);
|
||||
m_label->setVisible(false);
|
||||
m_searchTerm = new QLabel(m_descriptionContainer);
|
||||
m_searchTerm->setTextFormat(Qt::PlainText);
|
||||
m_searchTerm->setVisible(false);
|
||||
descriptionLayout->addWidget(m_label);
|
||||
descriptionLayout->addWidget(m_searchTerm);
|
||||
|
||||
@@ -546,7 +546,9 @@ static GerritUser parseGerritUser(const QJsonObject &object)
|
||||
|
||||
static int numberValue(const QJsonObject &object)
|
||||
{
|
||||
return object.value("number").toString().toInt();
|
||||
const QJsonValue number = object.value("number");
|
||||
// Since Gerrit 2.14 (commits fa92467dc and b0cfe1401) the change and patch set numbers are int
|
||||
return number.isString() ? number.toString().toInt() : number.toInt();
|
||||
}
|
||||
|
||||
/* Parse gerrit query Json output.
|
||||
|
||||
@@ -86,7 +86,7 @@ const char stashNamePrefix[] = "stash@{";
|
||||
const char noColorOption[] = "--no-color";
|
||||
const char decorateOption[] = "--decorate";
|
||||
const char showFormatC[] =
|
||||
"--pretty=format:commit %H%n"
|
||||
"--pretty=format:commit %H%d%n"
|
||||
"Author: %an <%ae>, %ad (%ar)%n"
|
||||
"Committer: %cn <%ce>, %cd (%cr)%n"
|
||||
"%n"
|
||||
@@ -359,7 +359,7 @@ private:
|
||||
|
||||
void ShowController::reload()
|
||||
{
|
||||
const QStringList args = {"show", "-s", noColorOption, decorateOption, showFormatC, m_id};
|
||||
const QStringList args = {"show", "-s", noColorOption, showFormatC, m_id};
|
||||
m_state = GettingDescription;
|
||||
runCommand(QList<QStringList>() << args, GitPlugin::client()->encoding(m_directory, "i18n.commitEncoding"));
|
||||
}
|
||||
|
||||
@@ -190,6 +190,7 @@ QString GitPlugin::invalidBranchAndRemoteNamePattern()
|
||||
"|//" // no double slash
|
||||
"|^[/-]" // no leading slash or dash
|
||||
"|\"" // no quotes
|
||||
"|\\*" // no asterisk
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1187,6 +1187,14 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet_data()
|
||||
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
|
||||
<< int(Abi::ElfFormat) << 32;
|
||||
|
||||
QTest::newRow("mips64el-linux-android") << int(Abi::MipsArchitecture)
|
||||
<< int(Abi::LinuxOS) << int(Abi::AndroidLinuxFlavor)
|
||||
<< int(Abi::ElfFormat) << 64;
|
||||
|
||||
QTest::newRow("mips64el-unknown-linux-android") << int(Abi::MipsArchitecture)
|
||||
<< int(Abi::LinuxOS) << int(Abi::AndroidLinuxFlavor)
|
||||
<< int(Abi::ElfFormat) << 64;
|
||||
|
||||
QTest::newRow("mips64-linux-octeon-gnu") << int(Abi::MipsArchitecture)
|
||||
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
|
||||
<< int(Abi::ElfFormat) << 64;
|
||||
|
||||
@@ -972,8 +972,13 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(const QString &comp
|
||||
return tc->typeId() == requiredTypeId
|
||||
&& tc->compilerCommand() == compilerPath;
|
||||
});
|
||||
if (!result.isEmpty())
|
||||
if (!result.isEmpty()) {
|
||||
for (ToolChain *tc : result) {
|
||||
if (tc->isAutoDetected())
|
||||
tc->setLanguage(language);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
result = autoDetectToolChain(compilerPath, language, requiredAbi);
|
||||
|
||||
@@ -1632,6 +1637,10 @@ void ProjectExplorerPlugin::testGccAbiGuessing_data()
|
||||
<< QString::fromLatin1("powerpc64-suse-linux")
|
||||
<< QByteArray("#define __SIZEOF_SIZE_T__ 8\n")
|
||||
<< QStringList({"ppc-linux-generic-elf-64bit"});
|
||||
QTest::newRow("Linux 11 (64bit mips)")
|
||||
<< QString::fromLatin1("mips64el-linux-uclibc")
|
||||
<< QByteArray("#define __SIZEOF_SIZE_T__ 8")
|
||||
<< QStringList({"mips-linux-generic-elf-64bit"});
|
||||
|
||||
QTest::newRow("Mingw 1 (32bit)")
|
||||
<< QString::fromLatin1("i686-w64-mingw32")
|
||||
|
||||
@@ -212,18 +212,15 @@ JsonWizardGenerator::OverwriteResult JsonWizardGenerator::promptForOverwrite(Jso
|
||||
if (overwriteDialog.exec() != QDialog::Accepted)
|
||||
return OverwriteCanceled;
|
||||
|
||||
const QStringList existingFilesToKeep = overwriteDialog.uncheckedFiles();
|
||||
const QSet<QString> existingFilesToKeep = QSet<QString>::fromList(overwriteDialog.uncheckedFiles());
|
||||
if (existingFilesToKeep.size() == files->size()) // All exist & all unchecked->Cancel.
|
||||
return OverwriteCanceled;
|
||||
|
||||
// Set 'keep' attribute in files
|
||||
foreach (const QString &keepFile, existingFilesToKeep) {
|
||||
JsonWizard::GeneratorFile file
|
||||
= Utils::findOr(*files, JsonWizard::GeneratorFile(),
|
||||
[&keepFile](const JsonWizard::GeneratorFile &f)
|
||||
{ return f.file.path() == keepFile; });
|
||||
if (!file.isValid())
|
||||
return OverwriteCanceled;
|
||||
for (JsonWizard::GeneratorFile &file : *files) {
|
||||
if (!existingFilesToKeep.contains(file.file.path()))
|
||||
continue;
|
||||
|
||||
file.file.setAttributes(file.file.attributes() | GeneratedFile::KeepExistingFileAttribute);
|
||||
}
|
||||
return OverwriteOk;
|
||||
|
||||
@@ -624,7 +624,10 @@ Utils::FileNameList MsvcToolChain::suggestedMkspecList() const
|
||||
<< Utils::FileName::fromLatin1("winrt-x64-msvc2015");
|
||||
break;
|
||||
case Abi::WindowsMsvc2017Flavor:
|
||||
result << Utils::FileName::fromLatin1("win32-msvc2017");
|
||||
result << Utils::FileName::fromLatin1("win32-msvc2017")
|
||||
<< Utils::FileName::fromLatin1("winrt-arm-msvc2017")
|
||||
<< Utils::FileName::fromLatin1("winrt-x86-msvc2017")
|
||||
<< Utils::FileName::fromLatin1("winrt-x64-msvc2017");
|
||||
break;
|
||||
default:
|
||||
result.clear();
|
||||
|
||||
@@ -439,6 +439,8 @@ public:
|
||||
void updatePanel()
|
||||
{
|
||||
ProjectItem *projectItem = m_projectsModel.rootItem()->childAt(0);
|
||||
if (!projectItem)
|
||||
return;
|
||||
setPanel(projectItem->data(0, PanelWidgetRole).value<QWidget *>());
|
||||
|
||||
QModelIndex activeIndex = projectItem->activeIndex();
|
||||
|
||||
@@ -133,7 +133,7 @@ ToolChain::ToolChain(const ToolChain &other) :
|
||||
|
||||
void ToolChain::setLanguage(Core::Id language)
|
||||
{
|
||||
QTC_ASSERT(!d->m_language.isValid(), return);
|
||||
QTC_ASSERT(!d->m_language.isValid() || isAutoDetected(), return);
|
||||
QTC_ASSERT(language.isValid(), return);
|
||||
QTC_ASSERT(ToolChainManager::isLanguageSupported(language), return);
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ bool QmakeProjectManagerPlugin::initialize(const QStringList &arguments, QString
|
||||
connect(EditorManager::instance(), &EditorManager::currentEditorChanged,
|
||||
this, &QmakeProjectManagerPlugin::updateBuildFileAction);
|
||||
|
||||
updateRunQMakeAction();
|
||||
updateActions();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -277,9 +277,12 @@ void QmakeProjectManagerPlugin::projectChanged()
|
||||
else
|
||||
m_previousStartupProject = qobject_cast<QmakeProject *>(SessionManager::startupProject());
|
||||
|
||||
if (m_previousStartupProject)
|
||||
if (m_previousStartupProject) {
|
||||
connect(m_previousStartupProject, &Project::activeTargetChanged,
|
||||
this, &QmakeProjectManagerPlugin::activeTargetChanged);
|
||||
connect(m_previousStartupProject, &QmakeProject::parsingFinished,
|
||||
this, &QmakeProjectManagerPlugin::updateActions);
|
||||
}
|
||||
|
||||
activeTargetChanged();
|
||||
}
|
||||
@@ -299,6 +302,12 @@ void QmakeProjectManagerPlugin::activeTargetChanged()
|
||||
updateRunQMakeAction();
|
||||
}
|
||||
|
||||
void QmakeProjectManagerPlugin::updateActions()
|
||||
{
|
||||
updateRunQMakeAction();
|
||||
updateContextActions();
|
||||
}
|
||||
|
||||
void QmakeProjectManagerPlugin::updateRunQMakeAction()
|
||||
{
|
||||
bool enable = true;
|
||||
@@ -307,6 +316,7 @@ void QmakeProjectManagerPlugin::updateRunQMakeAction()
|
||||
auto pro = qobject_cast<QmakeProject *>(m_previousStartupProject);
|
||||
m_runQMakeAction->setVisible(pro);
|
||||
if (!pro
|
||||
|| !pro->rootProjectNode()
|
||||
|| !pro->activeTarget()
|
||||
|| !pro->activeTarget()->activeBuildConfiguration())
|
||||
enable = false;
|
||||
@@ -334,7 +344,11 @@ void QmakeProjectManagerPlugin::updateContextActions()
|
||||
FileNode *fileNode = node ? node->asFileNode() : nullptr;
|
||||
|
||||
bool buildFilePossible = subProjectNode && fileNode && (fileNode->fileType() == FileType::Source);
|
||||
bool subProjectActionsVisible = qmakeProject && subProjectNode && (subProjectNode != qmakeProject->rootProjectNode());
|
||||
bool subProjectActionsVisible = false;
|
||||
if (qmakeProject && subProjectNode) {
|
||||
if (QmakeProFileNode *rootNode = qmakeProject->rootProjectNode())
|
||||
subProjectActionsVisible = subProjectNode != rootNode;
|
||||
}
|
||||
|
||||
QString subProjectName;
|
||||
if (subProjectActionsVisible)
|
||||
|
||||
@@ -65,6 +65,7 @@ private slots:
|
||||
private:
|
||||
void projectChanged();
|
||||
void activeTargetChanged();
|
||||
void updateActions();
|
||||
void updateRunQMakeAction();
|
||||
void updateContextActions();
|
||||
void buildStateChanged(ProjectExplorer::Project *pro);
|
||||
|
||||
@@ -256,6 +256,7 @@ bool QMakeStep::init(QList<const BuildStep *> &earlierSteps)
|
||||
QmakeProFileNode *node = static_cast<QmakeProject *>(qmakeBc->target()->project())->rootProjectNode();
|
||||
if (qmakeBc->subNodeBuild())
|
||||
node = qmakeBc->subNodeBuild();
|
||||
QTC_ASSERT(node, return false);
|
||||
QString proFile = node->filePath().toString();
|
||||
|
||||
QList<ProjectExplorer::Task> tasks = qtVersion->reportIssues(proFile, workingDirectory);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "exampleslistmodel.h"
|
||||
#include "screenshotcropper.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/winutils.h>
|
||||
|
||||
@@ -199,13 +200,16 @@ void ExamplesWelcomePage::openProject(const ExampleItem &item)
|
||||
if (!proFileInfo.exists())
|
||||
return;
|
||||
|
||||
QFileInfo pathInfo(proFileInfo.path());
|
||||
// If the Qt is a distro Qt on Linux, it will not be writable, hence compilation will fail
|
||||
if (!proFileInfo.isWritable()
|
||||
|| !pathInfo.isWritable() /* path of .pro file */
|
||||
|| !QFileInfo(pathInfo.path()).isWritable() /* shadow build directory */) {
|
||||
// Same if it is installed in non-writable location for other reasons
|
||||
const bool needsCopy = withNTFSPermissions<bool>([proFileInfo] {
|
||||
QFileInfo pathInfo(proFileInfo.path());
|
||||
return !proFileInfo.isWritable()
|
||||
|| !pathInfo.isWritable() /* path of .pro file */
|
||||
|| !QFileInfo(pathInfo.path()).isWritable() /* shadow build directory */;
|
||||
});
|
||||
if (needsCopy)
|
||||
proFile = copyToAlternativeLocation(proFileInfo, filesToOpen, item.dependencies);
|
||||
}
|
||||
|
||||
// don't try to load help and files if loading the help request is being cancelled
|
||||
if (proFile.isEmpty())
|
||||
|
||||
@@ -87,7 +87,8 @@ void ValgrindToolRunner::start()
|
||||
run->setValgrindExecutable(m_settings->valgrindExecutable());
|
||||
run->setValgrindArguments(genericToolArguments() + toolArguments());
|
||||
run->setDevice(device());
|
||||
run->setDebuggee(runControl()->runnable().as<StandardRunnable>());
|
||||
if (runControl()->runnable().is<StandardRunnable>())
|
||||
run->setDebuggee(runControl()->runnable().as<StandardRunnable>());
|
||||
|
||||
connect(run, &ValgrindRunner::processOutputReceived,
|
||||
this, &ValgrindToolRunner::receiveProcessOutput);
|
||||
@@ -113,7 +114,9 @@ void ValgrindToolRunner::stop()
|
||||
|
||||
QString ValgrindToolRunner::executable() const
|
||||
{
|
||||
return runControl()->runnable().as<StandardRunnable>().executable;
|
||||
const Runnable &runnable = runControl()->runnable();
|
||||
return runnable.is<StandardRunnable>() ?
|
||||
runnable.as<StandardRunnable>().executable : QString();
|
||||
}
|
||||
|
||||
QStringList ValgrindToolRunner::genericToolArguments() const
|
||||
|
||||
Submodule src/shared/qbs updated: da5e38c561...7687d8a145
@@ -5390,12 +5390,14 @@ void tst_Dumpers::dumper_data()
|
||||
|
||||
QTest::newRow("Bitfields")
|
||||
<< Data("",
|
||||
"enum E { V1, V2 };"
|
||||
"struct S\n"
|
||||
"{\n"
|
||||
" S() : x(2), y(3), z(39), c(1), b(0), f(5), d(6), i(7) {}\n"
|
||||
" S() : x(2), y(3), z(39), e(V2), c(1), b(0), f(5), d(6), i(7) {}\n"
|
||||
" unsigned int x : 3;\n"
|
||||
" unsigned int y : 4;\n"
|
||||
" unsigned int z : 18;\n"
|
||||
" E e : 3;\n"
|
||||
" bool c : 1;\n"
|
||||
" bool b;\n"
|
||||
" float f;\n"
|
||||
@@ -5414,9 +5416,11 @@ void tst_Dumpers::dumper_data()
|
||||
+ Check("s.x", "2", "unsigned int : 3") % NoCdbEngine
|
||||
+ Check("s.y", "3", "unsigned int : 4") % NoCdbEngine
|
||||
+ Check("s.z", "39", "unsigned int : 18") % NoCdbEngine
|
||||
+ Check("s.e", "1", "E : 3") % NoCdbEngine
|
||||
+ Check("s.x", "2", "unsigned int") % CdbEngine
|
||||
+ Check("s.y", "3", "unsigned int") % CdbEngine
|
||||
+ Check("s.z", "39", "unsigned int") % CdbEngine;
|
||||
+ Check("s.z", "39", "unsigned int") % CdbEngine
|
||||
+ Check("s.e", "V2 (1)", TypePattern("main::[a-zA-Z0-9_]*::E")) % CdbEngine;
|
||||
|
||||
|
||||
QTest::newRow("Function")
|
||||
@@ -5514,6 +5518,14 @@ void tst_Dumpers::dumper_data()
|
||||
+ Check("b6", "<10 items>", "TVector<int>") % GccVersion(0, 0);
|
||||
|
||||
|
||||
QTest::newRow("Typedef3")
|
||||
<< Data("typedef enum { Value } Unnamed;\n"
|
||||
"struct Foo { Unnamed u = Value; };\n",
|
||||
"Foo foo;")
|
||||
+ Cxx11Profile()
|
||||
+ Check("foo.u", "Value (0)", "Unnamed");
|
||||
|
||||
|
||||
QTest::newRow("Struct")
|
||||
<< Data(fooData,
|
||||
|
||||
|
||||
@@ -214,10 +214,10 @@ def __handleColorTips__(colTip, expectedColor, alternativeColor):
|
||||
return value
|
||||
|
||||
cmp = QColor()
|
||||
cmp.setNamedColor(expectedColor)
|
||||
cmp.setNamedColor(QString(expectedColor))
|
||||
if alternativeColor:
|
||||
alt = QColor()
|
||||
alt.setNamedColor(alternativeColor)
|
||||
alt.setNamedColor(QString(alternativeColor))
|
||||
if cmp.alpha() != 255 or alternativeColor and alt.alpha() != 255:
|
||||
test.warning("Cannot handle transparent colors - cancelling this verification")
|
||||
return
|
||||
|
||||
@@ -82,7 +82,7 @@ def main():
|
||||
# Creator should show the declaration of the function again.
|
||||
selectFromLocator("dummy.cpp")
|
||||
mainWin = findObject(":Qt Creator_Core::Internal::MainWindow")
|
||||
if not waitFor("'dummy.cpp ' in str(mainWin.windowTitle) and ' - cplusplus-tools - ' in str(mainWin.windowTitle)", 5000):
|
||||
if not waitFor("'dummy.cpp ' in str(mainWin.windowTitle) and ' @ cplusplus-tools ' in str(mainWin.windowTitle)", 5000):
|
||||
test.warning("Opening dummy.cpp seems to have failed")
|
||||
# Reset cursor to the start of the document
|
||||
if platform.system() == 'Darwin':
|
||||
|
||||
Reference in New Issue
Block a user