forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.2'
Conflicts: src/plugins/git/gerrit/gerritparameters.cpp src/plugins/git/gerrit/gerritplugin.h src/plugins/git/gitclient.cpp Change-Id: Ie7719cfe45489b72d64260e729dcce3760f33bec
This commit is contained in:
16
dist/changes-3.2.0
vendored
16
dist/changes-3.2.0
vendored
@@ -131,6 +131,7 @@ Analyzer
|
|||||||
|
|
||||||
C++ Support
|
C++ Support
|
||||||
* Added support for C99 designated initializers (QTCREATORBUG-1902)
|
* Added support for C99 designated initializers (QTCREATORBUG-1902)
|
||||||
|
* Added support for UTF-8 in the lexer (QTCREATORBUG-7356)
|
||||||
* Fixed finding usages of members of typedef'ed anonymous structs
|
* Fixed finding usages of members of typedef'ed anonymous structs
|
||||||
(QTCREATORBUG-11859, QTCREATORBUG-11860)
|
(QTCREATORBUG-11859, QTCREATORBUG-11860)
|
||||||
* Fixed indentation of concatenated strings
|
* Fixed indentation of concatenated strings
|
||||||
@@ -140,12 +141,10 @@ C++ Support
|
|||||||
(QTCREATORBUG-12309)
|
(QTCREATORBUG-12309)
|
||||||
* Fixed parsing of trailing type-specifier
|
* Fixed parsing of trailing type-specifier
|
||||||
* Fixed parsing of expressions like vector<int>{1}
|
* Fixed parsing of expressions like vector<int>{1}
|
||||||
* Fixed generating getters and setters for variables with
|
* Fixed the Create Getter and Setter Member Functions refactoring action
|
||||||
'm' and 'm_' prefixes
|
for variables with "m" and "m_" prefixes (QTCREATORBUG-12244)
|
||||||
* Fixed that "using namespace" did not highlight class in including files (QTCREATORBUG-12357)
|
* Fixed that "using Ns::Class" did not highlight class in including files (QTCREATORBUG-12357)
|
||||||
* Fixed include paths handling (QTCREATORBUG-11599)
|
* Fixed include paths handling (QTCREATORBUG-11599)
|
||||||
* Fixed corner cases for "Create Getter and Setter Member Functions" refactoring action
|
|
||||||
(QTCREATORBUG-12244)
|
|
||||||
* Fixed parsing of expressions like vector<int>{1}
|
* Fixed parsing of expressions like vector<int>{1}
|
||||||
* Fixed completion for template with default argument
|
* Fixed completion for template with default argument
|
||||||
(QTCREATORBUG-12606, QTCREATORBUG-12605)
|
(QTCREATORBUG-12606, QTCREATORBUG-12605)
|
||||||
@@ -155,8 +154,6 @@ C++ Support
|
|||||||
* Improved infrastructure for Clang integration
|
* Improved infrastructure for Clang integration
|
||||||
* Reworked indexing data structure
|
* Reworked indexing data structure
|
||||||
* Started to clean up C++ editor
|
* Started to clean up C++ editor
|
||||||
* Added support for UTF-8 in the lexer (QTCREATORBUG-7356)
|
|
||||||
* Added support for C99 designated initializers
|
|
||||||
|
|
||||||
QML Support
|
QML Support
|
||||||
* Fixed handling of properties that start with underscore (QTCREATORBUG-12214)
|
* Fixed handling of properties that start with underscore (QTCREATORBUG-12214)
|
||||||
@@ -196,6 +193,11 @@ FakeVim
|
|||||||
* Improved sharing of navigation data between editors of the
|
* Improved sharing of navigation data between editors of the
|
||||||
same document
|
same document
|
||||||
|
|
||||||
|
Beautifier
|
||||||
|
* Added support for formatting a file asynchronously
|
||||||
|
* Added support for redirecting text to a formatter tool
|
||||||
|
instead of using temporary files
|
||||||
|
|
||||||
Platform Specific
|
Platform Specific
|
||||||
|
|
||||||
Windows
|
Windows
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ QtcProduct {
|
|||||||
targetName: "tst_" + name.split(' ').join("")
|
targetName: "tst_" + name.split(' ').join("")
|
||||||
|
|
||||||
// This needs to be absolute, because it is passed to one of the source files.
|
// This needs to be absolute, because it is passed to one of the source files.
|
||||||
destinationDirectory: buildDirectory + '/'
|
destinationDirectory: project.buildDirectory + '/'
|
||||||
+ FileInfo.relativePath(project.ide_source_tree, sourceDirectory)
|
+ FileInfo.relativePath(project.ide_source_tree, sourceDirectory)
|
||||||
|
|
||||||
cpp.rpaths: [
|
cpp.rpaths: [
|
||||||
buildDirectory + '/' + project.ide_library_path,
|
project.buildDirectory + '/' + project.ide_library_path,
|
||||||
buildDirectory + '/' + project.ide_library_path + "/..", // OSX
|
project.buildDirectory + '/' + project.ide_library_path + "/..", // OSX
|
||||||
buildDirectory + '/' + project.ide_plugin_path
|
project.buildDirectory + '/' + project.ide_plugin_path
|
||||||
]
|
]
|
||||||
cpp.minimumOsxVersion: "10.7"
|
cpp.minimumOsxVersion: "10.7"
|
||||||
cpp.defines: base.filter(function(d) { return d != "QT_NO_CAST_FROM_ASCII"; })
|
cpp.defines: base.filter(function(d) { return d != "QT_NO_CAST_FROM_ASCII"; })
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ QTCREATOR_PRI_INCLUDED = 1
|
|||||||
|
|
||||||
QTCREATOR_VERSION = 3.1.83
|
QTCREATOR_VERSION = 3.1.83
|
||||||
QTCREATOR_COMPAT_VERSION = 3.1.83
|
QTCREATOR_COMPAT_VERSION = 3.1.83
|
||||||
BINARY_ARTIFACTS_BRANCH = master
|
BINARY_ARTIFACTS_BRANCH = 3.2
|
||||||
|
|
||||||
# enable c++11
|
# enable c++11
|
||||||
isEqual(QT_MAJOR_VERSION, 5) {
|
isEqual(QT_MAJOR_VERSION, 5) {
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ if [ $LLVM_INSTALL_DIR ]; then
|
|||||||
cp -f "$LLVM_INSTALL_DIR"/lib/libclang.dylib "$1/Contents/PlugIns/" || exit 1
|
cp -f "$LLVM_INSTALL_DIR"/lib/libclang.dylib "$1/Contents/PlugIns/" || exit 1
|
||||||
cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$1/Contents/Resources/cplusplus/" || exit 1
|
cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$1/Contents/Resources/cplusplus/" || exit 1
|
||||||
fi
|
fi
|
||||||
_CLANG_CODEMODEL_LIB="$1/Contents/PlugIns/QtProject/libClangCodeModel_debug.dylib"
|
_CLANG_CODEMODEL_LIB="$1/Contents/PlugIns/libClangCodeModel_debug.dylib"
|
||||||
if [ ! -f "$_CLANG_CODEMODEL_LIB" ]; then
|
if [ ! -f "$_CLANG_CODEMODEL_LIB" ]; then
|
||||||
_CLANG_CODEMODEL_LIB="$1/Contents/PlugIns/QtProject/libClangCodeModel.dylib"
|
_CLANG_CODEMODEL_LIB="$1/Contents/PlugIns/libClangCodeModel.dylib"
|
||||||
fi
|
fi
|
||||||
xcrun install_name_tool -rpath "$LLVM_INSTALL_DIR/lib" "@loader_path/.." "$_CLANG_CODEMODEL_LIB" || true
|
xcrun install_name_tool -rpath "$LLVM_INSTALL_DIR/lib" "@loader_path/.." "$_CLANG_CODEMODEL_LIB" || true
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1732,13 +1732,16 @@ def qform__QString():
|
|||||||
|
|
||||||
def qdump__QString(d, value):
|
def qdump__QString(d, value):
|
||||||
d.putStringValue(value)
|
d.putStringValue(value)
|
||||||
d.putNumChild(0)
|
data, size, alloc = d.stringData(value)
|
||||||
|
d.putNumChild(size)
|
||||||
format = d.currentItemFormat()
|
format = d.currentItemFormat()
|
||||||
if format == 1:
|
if format == 1:
|
||||||
d.putDisplay(StopDisplay)
|
d.putDisplay(StopDisplay)
|
||||||
elif format == 2:
|
elif format == 2:
|
||||||
d.putField("editformat", DisplayUtf16String)
|
d.putField("editformat", DisplayUtf16String)
|
||||||
d.putField("editvalue", d.encodeString(value, limit=None))
|
d.putField("editvalue", d.encodeString(value, limit=None))
|
||||||
|
if d.isExpanded():
|
||||||
|
d.putArrayData(data, size, d.lookupType(d.qtNamespace() + "QChar"))
|
||||||
|
|
||||||
def qdump__QStringData(d, value):
|
def qdump__QStringData(d, value):
|
||||||
d.putStringValueByAddress(toInteger(value))
|
d.putStringValueByAddress(toInteger(value))
|
||||||
|
|||||||
1
src/libs/3rdparty/cplusplus/AST.h
vendored
1
src/libs/3rdparty/cplusplus/AST.h
vendored
@@ -4467,6 +4467,7 @@ public:
|
|||||||
, mutable_token(0)
|
, mutable_token(0)
|
||||||
, exception_specification(0)
|
, exception_specification(0)
|
||||||
, trailing_return_type(0)
|
, trailing_return_type(0)
|
||||||
|
, symbol(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual LambdaDeclaratorAST *asLambdaDeclarator() { return this; }
|
virtual LambdaDeclaratorAST *asLambdaDeclarator() { return this; }
|
||||||
|
|||||||
@@ -721,7 +721,7 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope,
|
|||||||
continue; // skip using namespace directives
|
continue; // skip using namespace directives
|
||||||
else if (! id->match(s->identifier()))
|
else if (! id->match(s->identifier()))
|
||||||
continue;
|
continue;
|
||||||
else if (s->name()->isQualifiedNameId())
|
else if (s->name() && s->name()->isQualifiedNameId())
|
||||||
continue; // skip qualified ids.
|
continue; // skip qualified ids.
|
||||||
|
|
||||||
if (Q_UNLIKELY(debug)) {
|
if (Q_UNLIKELY(debug)) {
|
||||||
|
|||||||
@@ -350,7 +350,8 @@ void ResolveExpression::thisObject()
|
|||||||
FullySpecifiedType ptrTy(control()->pointerType(classTy));
|
FullySpecifiedType ptrTy(control()->pointerType(classTy));
|
||||||
addResult(ptrTy, fun->enclosingScope());
|
addResult(ptrTy, fun->enclosingScope());
|
||||||
break;
|
break;
|
||||||
} else if (const QualifiedNameId *q = fun->name()->asQualifiedNameId()) {
|
} else if (const Name *name = fun->name()) {
|
||||||
|
if (const QualifiedNameId *q = name->asQualifiedNameId()) {
|
||||||
if (q->base()) {
|
if (q->base()) {
|
||||||
FullySpecifiedType classTy(control()->namedType(q->base()));
|
FullySpecifiedType classTy(control()->namedType(q->base()));
|
||||||
FullySpecifiedType ptrTy(control()->pointerType(classTy));
|
FullySpecifiedType ptrTy(control()->pointerType(classTy));
|
||||||
@@ -361,6 +362,7 @@ void ResolveExpression::thisObject()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool ResolveExpression::visit(CompoundExpressionAST *ast)
|
bool ResolveExpression::visit(CompoundExpressionAST *ast)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "iplugin.h"
|
#include "iplugin.h"
|
||||||
#include "plugincollection.h"
|
#include "plugincollection.h"
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -691,6 +692,13 @@ void PluginManager::formatPluginVersions(QTextStream &str)
|
|||||||
|
|
||||||
void PluginManager::startTests()
|
void PluginManager::startTests()
|
||||||
{
|
{
|
||||||
|
if (PluginManager::hasError()) {
|
||||||
|
qWarning("Errors occurred while loading plugins, skipping test run. "
|
||||||
|
"For details, start without \"-test\" option.");
|
||||||
|
QTimer::singleShot(1, QCoreApplication::instance(), SLOT(quit()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
foreach (const PluginManagerPrivate::TestSpec &testSpec, d->testSpecs) {
|
foreach (const PluginManagerPrivate::TestSpec &testSpec, d->testSpecs) {
|
||||||
const PluginSpec * const pluginSpec = testSpec.pluginSpec;
|
const PluginSpec * const pluginSpec = testSpec.pluginSpec;
|
||||||
|
|||||||
@@ -91,6 +91,11 @@ QmlJS::Snapshot Context::snapshot() const
|
|||||||
return _snapshot;
|
return _snapshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ViewerContext Context::vContext() const
|
||||||
|
{
|
||||||
|
return _vContext;
|
||||||
|
}
|
||||||
|
|
||||||
const Imports *Context::imports(const QmlJS::Document *doc) const
|
const Imports *Context::imports(const QmlJS::Document *doc) const
|
||||||
{
|
{
|
||||||
if (!doc)
|
if (!doc)
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public:
|
|||||||
|
|
||||||
ValueOwner *valueOwner() const;
|
ValueOwner *valueOwner() const;
|
||||||
Snapshot snapshot() const;
|
Snapshot snapshot() const;
|
||||||
|
ViewerContext vContext() const;
|
||||||
|
|
||||||
const Imports *imports(const Document *doc) const;
|
const Imports *imports(const Document *doc) const;
|
||||||
|
|
||||||
|
|||||||
@@ -558,20 +558,19 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
|
|||||||
QRegExp vNr(QLatin1String("^(.+)\\.([0-9]+)(?:\\.([0-9]+))?$"));
|
QRegExp vNr(QLatin1String("^(.+)\\.([0-9]+)(?:\\.([0-9]+))?$"));
|
||||||
QRegExp safeName(QLatin1String("^[a-zA-Z_][[a-zA-Z0-9_]*$"));
|
QRegExp safeName(QLatin1String("^[a-zA-Z_][[a-zA-Z0-9_]*$"));
|
||||||
foreach (const ImportKey &importKey, packages) {
|
foreach (const ImportKey &importKey, packages) {
|
||||||
if (importKey.splitPath.size() == 1 && importKey.splitPath.at(0).isEmpty()) {
|
if (importKey.splitPath.size() == 1 && importKey.splitPath.at(0).isEmpty() && splitPath.length() > 0) {
|
||||||
// relocatable
|
// relocatable
|
||||||
QStringList myPath = splitPath;
|
QStringList myPath = splitPath;
|
||||||
if (vNr.indexIn(myPath.last()) == 0) {
|
if (vNr.indexIn(myPath.last()) == 0)
|
||||||
myPath.last() = vNr.cap(1);
|
myPath.last() = vNr.cap(1);
|
||||||
}
|
|
||||||
for (int iPath = myPath.size(); iPath != 1; ) {
|
for (int iPath = myPath.size(); iPath != 1; ) {
|
||||||
--iPath;
|
--iPath;
|
||||||
if (safeName.indexIn(myPath.at(iPath)) != 0)
|
if (safeName.indexIn(myPath.at(iPath)) != 0)
|
||||||
break;
|
break;
|
||||||
ImportKey iKey(ImportType::Library, QStringList(myPath.mid(iPath)).join(QLatin1String(".")),
|
ImportKey iKey(ImportType::Library, QStringList(myPath.mid(iPath)).join(QLatin1String(".")),
|
||||||
importKey.majorVersion, importKey.minorVersion);
|
importKey.majorVersion, importKey.minorVersion);
|
||||||
cImport.possibleExports.append(Export(iKey, QStringList(myPath.mid(0, iPath))
|
cImport.possibleExports.append(Export(iKey, (iPath == 1) ? QLatin1String("/") :
|
||||||
.join(QLatin1String("/")), true));
|
QStringList(myPath.mid(0, iPath)).join(QLatin1String("/")), true));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QString requiredPath = QStringList(splitPath.mid(0, splitPath.size() - importKey.splitPath.size()))
|
QString requiredPath = QStringList(splitPath.mid(0, splitPath.size() - importKey.splitPath.size()))
|
||||||
@@ -579,7 +578,7 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
|
|||||||
cImport.possibleExports << Export(importKey, requiredPath, true);
|
cImport.possibleExports << Export(importKey, requiredPath, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cImport.possibleExports.isEmpty()) {
|
if (cImport.possibleExports.isEmpty() && splitPath.size() > 0) {
|
||||||
QRegExp vNr(QLatin1String("^(.+)\\.([0-9]+)(?:\\.([0-9]+))?$"));
|
QRegExp vNr(QLatin1String("^(.+)\\.([0-9]+)(?:\\.([0-9]+))?$"));
|
||||||
QRegExp safeName(QLatin1String("^[a-zA-Z_][[a-zA-Z0-9_]*$"));
|
QRegExp safeName(QLatin1String("^[a-zA-Z_][[a-zA-Z0-9_]*$"));
|
||||||
int majorVersion = LanguageUtils::ComponentVersion::NoVersion;
|
int majorVersion = LanguageUtils::ComponentVersion::NoVersion;
|
||||||
@@ -601,8 +600,8 @@ void Snapshot::insertLibraryInfo(const QString &path, const LibraryInfo &info)
|
|||||||
break;
|
break;
|
||||||
ImportKey iKey(ImportType::Library, QStringList(splitPath.mid(iPath)).join(QLatin1String(".")),
|
ImportKey iKey(ImportType::Library, QStringList(splitPath.mid(iPath)).join(QLatin1String(".")),
|
||||||
majorVersion, minorVersion);
|
majorVersion, minorVersion);
|
||||||
cImport.possibleExports.append(Export(iKey, QStringList(splitPath.mid(0, iPath))
|
cImport.possibleExports.append(Export(iKey, (iPath == 1) ? QLatin1String("/") :
|
||||||
.join(QLatin1String("/")), true));
|
QStringList(splitPath.mid(0, iPath)).join(QLatin1String("/")), true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (const QmlDirParser::Component &component, info.components()) {
|
foreach (const QmlDirParser::Component &component, info.components()) {
|
||||||
|
|||||||
@@ -198,6 +198,14 @@ ImportKey ImportKey::flatKey() const {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ImportKey::libPath() const
|
||||||
|
{
|
||||||
|
QString res = splitPath.join(QString::fromLatin1("."));
|
||||||
|
if (res.isEmpty() && !splitPath.isEmpty())
|
||||||
|
return QLatin1String("");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
QString ImportKey::path() const
|
QString ImportKey::path() const
|
||||||
{
|
{
|
||||||
QString res = splitPath.join(QString::fromLatin1("/"));
|
QString res = splitPath.join(QString::fromLatin1("/"));
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ public:
|
|||||||
int minorVersion;
|
int minorVersion;
|
||||||
|
|
||||||
QString path() const;
|
QString path() const;
|
||||||
|
QString libPath() const;
|
||||||
|
|
||||||
void addToHash(QCryptographicHash &hash) const;
|
void addToHash(QCryptographicHash &hash) const;
|
||||||
ImportKey flatKey() const;
|
ImportKey flatKey() const;
|
||||||
|
|||||||
@@ -170,13 +170,29 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
|
FakeMetaObjectWithOrigin::FakeMetaObjectWithOrigin(FakeMetaObject::ConstPtr fakeMetaObject, const QString &originId)
|
||||||
|
: fakeMetaObject(fakeMetaObject)
|
||||||
|
, originId(originId)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
bool FakeMetaObjectWithOrigin::operator ==(const FakeMetaObjectWithOrigin &o) const
|
||||||
|
{
|
||||||
|
return fakeMetaObject == o.fakeMetaObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint qHash(const FakeMetaObjectWithOrigin &fmoo, int seed)
|
||||||
|
{
|
||||||
|
return qHash(fmoo.fakeMetaObject, seed);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace QmlJS
|
} // namespace QmlJS
|
||||||
|
|
||||||
CppComponentValue::CppComponentValue(FakeMetaObject::ConstPtr metaObject, const QString &className,
|
CppComponentValue::CppComponentValue(FakeMetaObject::ConstPtr metaObject, const QString &className,
|
||||||
const QString &packageName, const ComponentVersion &componentVersion,
|
const QString &packageName, const ComponentVersion &componentVersion,
|
||||||
const ComponentVersion &importVersion, int metaObjectRevision,
|
const ComponentVersion &importVersion, int metaObjectRevision,
|
||||||
ValueOwner *valueOwner)
|
ValueOwner *valueOwner, const QString &originId)
|
||||||
: ObjectValue(valueOwner),
|
: ObjectValue(valueOwner, originId),
|
||||||
m_metaObject(metaObject),
|
m_metaObject(metaObject),
|
||||||
m_moduleName(packageName),
|
m_moduleName(packageName),
|
||||||
m_componentVersion(componentVersion),
|
m_componentVersion(componentVersion),
|
||||||
@@ -960,8 +976,8 @@ bool MemberProcessor::processGeneratedSlot(const QString &, const Value *)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectValue::ObjectValue(ValueOwner *valueOwner)
|
ObjectValue::ObjectValue(ValueOwner *valueOwner, const QString &originId)
|
||||||
: m_valueOwner(valueOwner),
|
: m_valueOwner(valueOwner), m_originId(originId),
|
||||||
_prototype(0)
|
_prototype(0)
|
||||||
{
|
{
|
||||||
valueOwner->registerValue(this);
|
valueOwner->registerValue(this);
|
||||||
@@ -1374,7 +1390,7 @@ const QLatin1String CppQmlTypes::defaultPackage("<default>");
|
|||||||
const QLatin1String CppQmlTypes::cppPackage("<cpp>");
|
const QLatin1String CppQmlTypes::cppPackage("<cpp>");
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void CppQmlTypes::load(const T &fakeMetaObjects, const QString &overridePackage)
|
void CppQmlTypes::load(const QString &originId, const T &fakeMetaObjects, const QString &overridePackage)
|
||||||
{
|
{
|
||||||
QList<CppComponentValue *> newCppTypes;
|
QList<CppComponentValue *> newCppTypes;
|
||||||
foreach (const FakeMetaObject::ConstPtr &fmo, fakeMetaObjects) {
|
foreach (const FakeMetaObject::ConstPtr &fmo, fakeMetaObjects) {
|
||||||
@@ -1382,7 +1398,7 @@ void CppQmlTypes::load(const T &fakeMetaObjects, const QString &overridePackage)
|
|||||||
QString package = exp.package;
|
QString package = exp.package;
|
||||||
if (package.isEmpty())
|
if (package.isEmpty())
|
||||||
package = overridePackage;
|
package = overridePackage;
|
||||||
m_fakeMetaObjectsByPackage[package].insert(fmo);
|
m_fakeMetaObjectsByPackage[package].insert(FakeMetaObjectWithOrigin(fmo, originId));
|
||||||
|
|
||||||
// make versionless cpp types directly
|
// make versionless cpp types directly
|
||||||
// needed for access to property types that are not exported, like QDeclarativeAnchors
|
// needed for access to property types that are not exported, like QDeclarativeAnchors
|
||||||
@@ -1391,7 +1407,7 @@ void CppQmlTypes::load(const T &fakeMetaObjects, const QString &overridePackage)
|
|||||||
QTC_ASSERT(exp.type == fmo->className(), continue);
|
QTC_ASSERT(exp.type == fmo->className(), continue);
|
||||||
CppComponentValue *cppValue = new CppComponentValue(
|
CppComponentValue *cppValue = new CppComponentValue(
|
||||||
fmo, fmo->className(), cppPackage, ComponentVersion(), ComponentVersion(),
|
fmo, fmo->className(), cppPackage, ComponentVersion(), ComponentVersion(),
|
||||||
ComponentVersion::MaxVersion, m_valueOwner);
|
ComponentVersion::MaxVersion, m_valueOwner, originId);
|
||||||
m_objectsByQualifiedName[qualifiedName(cppPackage, fmo->className(), ComponentVersion())] = cppValue;
|
m_objectsByQualifiedName[qualifiedName(cppPackage, fmo->className(), ComponentVersion())] = cppValue;
|
||||||
newCppTypes += cppValue;
|
newCppTypes += cppValue;
|
||||||
}
|
}
|
||||||
@@ -1407,8 +1423,8 @@ void CppQmlTypes::load(const T &fakeMetaObjects, const QString &overridePackage)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// explicitly instantiate load for list and hash
|
// explicitly instantiate load for list and hash
|
||||||
template void CppQmlTypes::load< QList<FakeMetaObject::ConstPtr> >(const QList<FakeMetaObject::ConstPtr> &, const QString &);
|
template void CppQmlTypes::load< QList<FakeMetaObject::ConstPtr> >(const QString &, const QList<FakeMetaObject::ConstPtr> &, const QString &);
|
||||||
template void CppQmlTypes::load< QHash<QString, FakeMetaObject::ConstPtr> >(const QHash<QString, FakeMetaObject::ConstPtr> &, const QString &);
|
template void CppQmlTypes::load< QHash<QString, FakeMetaObject::ConstPtr> >(const QString &, const QHash<QString, FakeMetaObject::ConstPtr> &, const QString &);
|
||||||
|
|
||||||
QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QString &package, ComponentVersion version)
|
QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QString &package, ComponentVersion version)
|
||||||
{
|
{
|
||||||
@@ -1417,7 +1433,8 @@ QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QStri
|
|||||||
QList<const CppComponentValue *> newObjects;
|
QList<const CppComponentValue *> newObjects;
|
||||||
|
|
||||||
// make new exported objects
|
// make new exported objects
|
||||||
foreach (const FakeMetaObject::ConstPtr &fmo, m_fakeMetaObjectsByPackage.value(package)) {
|
foreach (const FakeMetaObjectWithOrigin &fmoo, m_fakeMetaObjectsByPackage.value(package)) {
|
||||||
|
const FakeMetaObject::ConstPtr &fmo = fmoo.fakeMetaObject;
|
||||||
// find the highest-version export for each alias
|
// find the highest-version export for each alias
|
||||||
QHash<QString, FakeMetaObject::Export> bestExports;
|
QHash<QString, FakeMetaObject::Export> bestExports;
|
||||||
foreach (const FakeMetaObject::Export &exp, fmo->exports()) {
|
foreach (const FakeMetaObject::Export &exp, fmo->exports()) {
|
||||||
@@ -1449,7 +1466,8 @@ QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QStri
|
|||||||
|
|
||||||
CppComponentValue *newComponent = new CppComponentValue(
|
CppComponentValue *newComponent = new CppComponentValue(
|
||||||
fmo, name, package, bestExport.version, version,
|
fmo, name, package, bestExport.version, version,
|
||||||
bestExport.metaObjectRevision, m_valueOwner);
|
bestExport.metaObjectRevision, m_valueOwner,
|
||||||
|
fmoo.originId);
|
||||||
|
|
||||||
// use package.cppname importversion as key
|
// use package.cppname importversion as key
|
||||||
m_objectsByQualifiedName.insert(key, newComponent);
|
m_objectsByQualifiedName.insert(key, newComponent);
|
||||||
@@ -1463,6 +1481,8 @@ QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QStri
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set their prototypes, creating them if necessary
|
// set their prototypes, creating them if necessary
|
||||||
|
// this ensures that the prototypes of C++ objects are resolved correctly and with the correct
|
||||||
|
// revision, and cannot be hidden by other objects.
|
||||||
foreach (const CppComponentValue *cobject, newObjects) {
|
foreach (const CppComponentValue *cobject, newObjects) {
|
||||||
CppComponentValue *object = const_cast<CppComponentValue *>(cobject);
|
CppComponentValue *object = const_cast<CppComponentValue *>(cobject);
|
||||||
while (!object->prototype()) {
|
while (!object->prototype()) {
|
||||||
@@ -1485,8 +1505,10 @@ QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QStri
|
|||||||
|
|
||||||
// make a new object
|
// make a new object
|
||||||
CppComponentValue *proto = new CppComponentValue(
|
CppComponentValue *proto = new CppComponentValue(
|
||||||
protoFmo, protoCppName, object->moduleName(), ComponentVersion(),
|
protoFmo, protoCppName, object->moduleName(),
|
||||||
object->importVersion(), ComponentVersion::MaxVersion, m_valueOwner);
|
ComponentVersion(),
|
||||||
|
object->importVersion(), ComponentVersion::MaxVersion, m_valueOwner,
|
||||||
|
cppProto->originId());
|
||||||
m_objectsByQualifiedName.insert(key, proto);
|
m_objectsByQualifiedName.insert(key, proto);
|
||||||
object->setPrototype(proto);
|
object->setPrototype(proto);
|
||||||
|
|
||||||
@@ -1786,7 +1808,8 @@ ASTObjectValue::ASTObjectValue(UiQualifiedId *typeName,
|
|||||||
UiObjectInitializer *initializer,
|
UiObjectInitializer *initializer,
|
||||||
const Document *doc,
|
const Document *doc,
|
||||||
ValueOwner *valueOwner)
|
ValueOwner *valueOwner)
|
||||||
: ObjectValue(valueOwner), m_typeName(typeName), m_initializer(initializer), m_doc(doc), m_defaultPropertyRef(0)
|
: ObjectValue(valueOwner, doc->importId()),
|
||||||
|
m_typeName(typeName), m_initializer(initializer), m_doc(doc), m_defaultPropertyRef(0)
|
||||||
{
|
{
|
||||||
if (m_initializer) {
|
if (m_initializer) {
|
||||||
for (UiObjectMemberList *it = m_initializer->members; it; it = it->next) {
|
for (UiObjectMemberList *it = m_initializer->members; it; it = it->next) {
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ public:
|
|||||||
class QMLJS_EXPORT ObjectValue: public Value
|
class QMLJS_EXPORT ObjectValue: public Value
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ObjectValue(ValueOwner *valueOwner);
|
ObjectValue(ValueOwner *valueOwner, const QString &originId = QString());
|
||||||
~ObjectValue();
|
~ObjectValue();
|
||||||
|
|
||||||
ValueOwner *valueOwner() const;
|
ValueOwner *valueOwner() const;
|
||||||
@@ -475,6 +475,9 @@ public:
|
|||||||
// Value interface
|
// Value interface
|
||||||
const ObjectValue *asObjectValue() const QTC_OVERRIDE;
|
const ObjectValue *asObjectValue() const QTC_OVERRIDE;
|
||||||
void accept(ValueVisitor *visitor) const QTC_OVERRIDE;
|
void accept(ValueVisitor *visitor) const QTC_OVERRIDE;
|
||||||
|
QString originId() const
|
||||||
|
{ return m_originId; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool checkPrototype(const ObjectValue *prototype, QSet<const ObjectValue *> *processed) const;
|
bool checkPrototype(const ObjectValue *prototype, QSet<const ObjectValue *> *processed) const;
|
||||||
@@ -483,6 +486,7 @@ private:
|
|||||||
ValueOwner *m_valueOwner;
|
ValueOwner *m_valueOwner;
|
||||||
QHash<QString, const Value *> m_members;
|
QHash<QString, const Value *> m_members;
|
||||||
QString m_className;
|
QString m_className;
|
||||||
|
QString m_originId;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const Value *_prototype;
|
const Value *_prototype;
|
||||||
@@ -542,7 +546,7 @@ public:
|
|||||||
CppComponentValue(LanguageUtils::FakeMetaObject::ConstPtr metaObject, const QString &className,
|
CppComponentValue(LanguageUtils::FakeMetaObject::ConstPtr metaObject, const QString &className,
|
||||||
const QString &moduleName, const LanguageUtils::ComponentVersion &componentVersion,
|
const QString &moduleName, const LanguageUtils::ComponentVersion &componentVersion,
|
||||||
const LanguageUtils::ComponentVersion &importVersion, int metaObjectRevision,
|
const LanguageUtils::ComponentVersion &importVersion, int metaObjectRevision,
|
||||||
ValueOwner *valueOwner);
|
ValueOwner *valueOwner, const QString &originId);
|
||||||
~CppComponentValue();
|
~CppComponentValue();
|
||||||
|
|
||||||
const CppComponentValue *asCppComponentValue() const QTC_OVERRIDE;
|
const CppComponentValue *asCppComponentValue() const QTC_OVERRIDE;
|
||||||
@@ -673,6 +677,18 @@ public:
|
|||||||
QList<ModuleApiInfo> *newModuleApis, QString *errorMessage, QString *warningMessage, const QString &fileName);
|
QList<ModuleApiInfo> *newModuleApis, QString *errorMessage, QString *warningMessage, const QString &fileName);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class QMLJS_EXPORT FakeMetaObjectWithOrigin
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LanguageUtils::FakeMetaObject::ConstPtr fakeMetaObject;
|
||||||
|
QString originId;
|
||||||
|
FakeMetaObjectWithOrigin(LanguageUtils::FakeMetaObject::ConstPtr fakeMetaObject,
|
||||||
|
const QString &originId);
|
||||||
|
bool operator ==(const FakeMetaObjectWithOrigin &o) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
QMLJS_EXPORT uint qHash(const FakeMetaObjectWithOrigin &fmoo, int seed = 0);
|
||||||
|
|
||||||
class QMLJS_EXPORT CppQmlTypes
|
class QMLJS_EXPORT CppQmlTypes
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -684,7 +700,7 @@ public:
|
|||||||
static const QLatin1String cppPackage;
|
static const QLatin1String cppPackage;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void load(const T &fakeMetaObjects, const QString &overridePackage = QString());
|
void load(const QString &originId, const T &fakeMetaObjects, const QString &overridePackage = QString());
|
||||||
|
|
||||||
QList<const CppComponentValue *> createObjectsForImport(const QString &package, LanguageUtils::ComponentVersion version);
|
QList<const CppComponentValue *> createObjectsForImport(const QString &package, LanguageUtils::ComponentVersion version);
|
||||||
bool hasModule(const QString &module) const;
|
bool hasModule(const QString &module) const;
|
||||||
@@ -703,7 +719,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
// "Package.CppName ImportVersion" -> CppComponentValue
|
// "Package.CppName ImportVersion" -> CppComponentValue
|
||||||
QHash<QString, const CppComponentValue *> m_objectsByQualifiedName;
|
QHash<QString, const CppComponentValue *> m_objectsByQualifiedName;
|
||||||
QHash<QString, QSet<LanguageUtils::FakeMetaObject::ConstPtr> > m_fakeMetaObjectsByPackage;
|
QHash<QString, QSet<FakeMetaObjectWithOrigin> > m_fakeMetaObjectsByPackage;
|
||||||
const ObjectValue *m_cppContextProperties;
|
const ObjectValue *m_cppContextProperties;
|
||||||
ValueOwner *m_valueOwner;
|
ValueOwner *m_valueOwner;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -147,10 +147,14 @@ Link::Link(const Snapshot &snapshot, const ViewerContext &vContext, const Librar
|
|||||||
ModelManagerInterface *modelManager = ModelManagerInterface::instance();
|
ModelManagerInterface *modelManager = ModelManagerInterface::instance();
|
||||||
if (modelManager) {
|
if (modelManager) {
|
||||||
ModelManagerInterface::CppDataHash cppDataHash = modelManager->cppData();
|
ModelManagerInterface::CppDataHash cppDataHash = modelManager->cppData();
|
||||||
|
{
|
||||||
// populate engine with types from C++
|
// populate engine with types from C++
|
||||||
foreach (const ModelManagerInterface::CppData &cppData, cppDataHash) {
|
ModelManagerInterface::CppDataHashIterator cppDataHashIterator(cppDataHash);
|
||||||
d->valueOwner->cppQmlTypes().load(cppData.exportedTypes);
|
while (cppDataHashIterator.hasNext()) {
|
||||||
|
cppDataHashIterator.next();
|
||||||
|
d->valueOwner->cppQmlTypes().load(cppDataHashIterator.key(),
|
||||||
|
cppDataHashIterator.value().exportedTypes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// build an object with the context properties from C++
|
// build an object with the context properties from C++
|
||||||
@@ -197,13 +201,13 @@ Context::ImportsPerDocument LinkPrivate::linkImports()
|
|||||||
// load builtin objects
|
// load builtin objects
|
||||||
if (builtins.pluginTypeInfoStatus() == LibraryInfo::DumpDone
|
if (builtins.pluginTypeInfoStatus() == LibraryInfo::DumpDone
|
||||||
|| builtins.pluginTypeInfoStatus() == LibraryInfo::TypeInfoFileDone) {
|
|| builtins.pluginTypeInfoStatus() == LibraryInfo::TypeInfoFileDone) {
|
||||||
valueOwner->cppQmlTypes().load(builtins.metaObjects());
|
valueOwner->cppQmlTypes().load(QLatin1String("<builtins>"), builtins.metaObjects());
|
||||||
} else {
|
} else {
|
||||||
valueOwner->cppQmlTypes().load(CppQmlTypesLoader::defaultQtObjects);
|
valueOwner->cppQmlTypes().load(QLatin1String("<defaults>"), CppQmlTypesLoader::defaultQtObjects);
|
||||||
}
|
}
|
||||||
|
|
||||||
// load library objects shipped with Creator
|
// load library objects shipped with Creator
|
||||||
valueOwner->cppQmlTypes().load(CppQmlTypesLoader::defaultLibraryObjects);
|
valueOwner->cppQmlTypes().load(QLatin1String("<defaultQt4>"), CppQmlTypesLoader::defaultLibraryObjects);
|
||||||
|
|
||||||
if (document) {
|
if (document) {
|
||||||
// do it on document first, to make sure import errors are shown
|
// do it on document first, to make sure import errors are shown
|
||||||
@@ -483,7 +487,7 @@ bool LinkPrivate::importLibrary(Document::Ptr doc,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const QString packageName = importInfo.name();
|
const QString packageName = importInfo.name();
|
||||||
valueOwner->cppQmlTypes().load(libraryInfo.metaObjects(), packageName);
|
valueOwner->cppQmlTypes().load(libraryPath, libraryInfo.metaObjects(), packageName);
|
||||||
foreach (const CppComponentValue *object, valueOwner->cppQmlTypes().createObjectsForImport(packageName, version)) {
|
foreach (const CppComponentValue *object, valueOwner->cppQmlTypes().createObjectsForImport(packageName, version)) {
|
||||||
import->object->setMember(object->className(), object);
|
import->object->setMember(object->className(), object);
|
||||||
}
|
}
|
||||||
@@ -578,7 +582,7 @@ void LinkPrivate::loadImplicitDefaultImports(Imports *imports)
|
|||||||
if (!import.object) {
|
if (!import.object) {
|
||||||
import.valid = true;
|
import.valid = true;
|
||||||
import.info = info;
|
import.info = info;
|
||||||
import.object = new ObjectValue(valueOwner);
|
import.object = new ObjectValue(valueOwner, QLatin1String("<defaults>"));
|
||||||
foreach (const CppComponentValue *object,
|
foreach (const CppComponentValue *object,
|
||||||
valueOwner->cppQmlTypes().createObjectsForImport(
|
valueOwner->cppQmlTypes().createObjectsForImport(
|
||||||
defaultPackage, maxVersion)) {
|
defaultPackage, maxVersion)) {
|
||||||
|
|||||||
@@ -1250,8 +1250,20 @@ void ModelManagerInterface::updateCppQmlTypes(QFutureInterface<void> &interface,
|
|||||||
hasNewInfo = hasNewInfo || newData.remove(fileName) > 0;
|
hasNewInfo = hasNewInfo || newData.remove(fileName) > 0;
|
||||||
} else {
|
} else {
|
||||||
CppData &data = newData[fileName];
|
CppData &data = newData[fileName];
|
||||||
// currently we have no simple way to compare, so we assume the worse
|
if (!hasNewInfo && (data.exportedTypes.size() != exported.size()
|
||||||
|
|| data.contextProperties != contextProperties))
|
||||||
hasNewInfo = true;
|
hasNewInfo = true;
|
||||||
|
if (!hasNewInfo) {
|
||||||
|
QHash<QString, QByteArray> newFingerprints;
|
||||||
|
foreach (LanguageUtils::FakeMetaObject::ConstPtr newType, exported)
|
||||||
|
newFingerprints[newType->className()]=newType->fingerprint();
|
||||||
|
foreach (LanguageUtils::FakeMetaObject::ConstPtr oldType, data.exportedTypes) {
|
||||||
|
if (newFingerprints.value(oldType->className()) != oldType->fingerprint()) {
|
||||||
|
hasNewInfo = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
data.exportedTypes = exported;
|
data.exportedTypes = exported;
|
||||||
data.contextProperties = contextProperties;
|
data.contextProperties = contextProperties;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef QHash<QString, CppData> CppDataHash;
|
typedef QHash<QString, CppData> CppDataHash;
|
||||||
|
typedef QHashIterator<QString, CppData> CppDataHashIterator;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ModelManagerInterface(QObject *parent = 0);
|
ModelManagerInterface(QObject *parent = 0);
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ extern "C" HRESULT CALLBACK pid(CIDebugClient *client, PCSTR args)
|
|||||||
|
|
||||||
int token;
|
int token;
|
||||||
commandTokens<StringList>(args, &token);
|
commandTokens<StringList>(args, &token);
|
||||||
dprintf("Qt Creator CDB extension version 3.1 %d bit built %s.\n",
|
dprintf("Qt Creator CDB extension version 3.2 %d bit built %s.\n",
|
||||||
sizeof(void *) * 8, __DATE__);
|
sizeof(void *) * 8, __DATE__);
|
||||||
if (const ULONG pid = currentProcessId(client))
|
if (const ULONG pid = currentProcessId(client))
|
||||||
ExtensionContext::instance().report('R', token, 0, "pid", "%u", pid);
|
ExtensionContext::instance().report('R', token, 0, "pid", "%u", pid);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
BaseTreeView::BaseTreeView(QWidget *parent)
|
BaseTreeView::BaseTreeView(QWidget *parent)
|
||||||
: Utils::TreeView(parent)
|
: TreeView(parent)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_MacShowFocusRect, false);
|
setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||||
setFrameStyle(QFrame::NoFrame);
|
setFrameStyle(QFrame::NoFrame);
|
||||||
@@ -87,7 +87,7 @@ void BaseTreeView::setModel(QAbstractItemModel *m)
|
|||||||
if (index != -1)
|
if (index != -1)
|
||||||
disconnect(model(), SIGNAL(columnAdjustmentRequested()), this, SLOT(resizeColumns()));
|
disconnect(model(), SIGNAL(columnAdjustmentRequested()), this, SLOT(resizeColumns()));
|
||||||
}
|
}
|
||||||
Utils::TreeView::setModel(m);
|
TreeView::setModel(m);
|
||||||
if (m) {
|
if (m) {
|
||||||
int index = m->metaObject()->indexOfSignal(sig);
|
int index = m->metaObject()->indexOfSignal(sig);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
@@ -97,7 +97,7 @@ void BaseTreeView::setModel(QAbstractItemModel *m)
|
|||||||
|
|
||||||
void BaseTreeView::mousePressEvent(QMouseEvent *ev)
|
void BaseTreeView::mousePressEvent(QMouseEvent *ev)
|
||||||
{
|
{
|
||||||
Utils::TreeView::mousePressEvent(ev);
|
TreeView::mousePressEvent(ev);
|
||||||
const QModelIndex mi = indexAt(ev->pos());
|
const QModelIndex mi = indexAt(ev->pos());
|
||||||
if (!mi.isValid())
|
if (!mi.isValid())
|
||||||
toggleColumnWidth(columnAt(ev->x()));
|
toggleColumnWidth(columnAt(ev->x()));
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT BaseTreeView : public Utils::TreeView
|
class QTCREATOR_UTILS_EXPORT BaseTreeView : public TreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FileName BuildableHelperLibrary::findSystemQt(const Utils::Environment &env)
|
FileName BuildableHelperLibrary::findSystemQt(const Environment &env)
|
||||||
{
|
{
|
||||||
QStringList paths = env.path();
|
QStringList paths = env.path();
|
||||||
foreach (const QString &path, paths) {
|
foreach (const QString &path, paths) {
|
||||||
@@ -78,11 +78,11 @@ Utils::FileName BuildableHelperLibrary::findSystemQt(const Utils::Environment &e
|
|||||||
qmake.setFile(qtChooserToQmakePath(qmake.symLinkTarget()));
|
qmake.setFile(qtChooserToQmakePath(qmake.symLinkTarget()));
|
||||||
|
|
||||||
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull())
|
if (!qtVersionForQMake(qmake.absoluteFilePath()).isNull())
|
||||||
return Utils::FileName(qmake);
|
return FileName(qmake);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Utils::FileName();
|
return FileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath)
|
QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath)
|
||||||
@@ -105,7 +105,7 @@ QString BuildableHelperLibrary::qtVersionForQMake(const QString &qmakePath, bool
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
if (!qmake.waitForFinished()) {
|
if (!qmake.waitForFinished()) {
|
||||||
Utils::SynchronousProcess::stopProcess(qmake);
|
SynchronousProcess::stopProcess(qmake);
|
||||||
qWarning("Timeout running '%s'.", qPrintable(qmakePath));
|
qWarning("Timeout running '%s'.", qPrintable(qmakePath));
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class QTCREATOR_UTILS_EXPORT BuildableHelperLibrary
|
|||||||
public:
|
public:
|
||||||
// returns the full path to the first qmake, qmake-qt4, qmake4 that has
|
// returns the full path to the first qmake, qmake-qt4, qmake4 that has
|
||||||
// at least version 2.0.0 and thus is a qt4 qmake
|
// at least version 2.0.0 and thus is a qt4 qmake
|
||||||
static FileName findSystemQt(const Utils::Environment &env);
|
static FileName findSystemQt(const Environment &env);
|
||||||
static bool isQtChooser(const QFileInfo &info);
|
static bool isQtChooser(const QFileInfo &info);
|
||||||
static QString qtChooserToQmakePath(const QString &path);
|
static QString qtChooserToQmakePath(const QString &path);
|
||||||
// return true if the qmake at qmakePath is qt4 (used by QtVersion)
|
// return true if the qmake at qmakePath is qt4 (used by QtVersion)
|
||||||
@@ -63,11 +63,11 @@ public:
|
|||||||
struct BuildHelperArguments {
|
struct BuildHelperArguments {
|
||||||
QString helperName;
|
QString helperName;
|
||||||
QString directory;
|
QString directory;
|
||||||
Utils::Environment environment;
|
Environment environment;
|
||||||
|
|
||||||
Utils::FileName qmakeCommand;
|
FileName qmakeCommand;
|
||||||
QString targetMode;
|
QString targetMode;
|
||||||
Utils::FileName mkspec;
|
FileName mkspec;
|
||||||
QString proFilename;
|
QString proFilename;
|
||||||
QStringList qmakeArguments;
|
QStringList qmakeArguments;
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ ClassNameValidatingLineEditPrivate:: ClassNameValidatingLineEditPrivate() :
|
|||||||
|
|
||||||
// --------------------- ClassNameValidatingLineEdit
|
// --------------------- ClassNameValidatingLineEdit
|
||||||
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
|
ClassNameValidatingLineEdit::ClassNameValidatingLineEdit(QWidget *parent) :
|
||||||
Utils::FancyLineEdit(parent),
|
FancyLineEdit(parent),
|
||||||
d(new ClassNameValidatingLineEditPrivate)
|
d(new ClassNameValidatingLineEditPrivate)
|
||||||
{
|
{
|
||||||
updateRegExp();
|
updateRegExp();
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ namespace Utils {
|
|||||||
|
|
||||||
struct ClassNameValidatingLineEditPrivate;
|
struct ClassNameValidatingLineEditPrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit
|
class QTCREATOR_UTILS_EXPORT ClassNameValidatingLineEdit : public FancyLineEdit
|
||||||
: public Utils::FancyLineEdit
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
|
Q_PROPERTY(bool namespacesEnabled READ namespacesEnabled WRITE setNamespacesEnabled DESIGNABLE true)
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString stubPath = QCoreApplication::applicationDirPath();
|
QString stubPath = QCoreApplication::applicationDirPath();
|
||||||
if (Utils::HostOsInfo::isMacHost())
|
if (HostOsInfo::isMacHost())
|
||||||
stubPath.append(QLatin1String("/../Resources/qtcreator_process_stub"));
|
stubPath.append(QLatin1String("/../Resources/qtcreator_process_stub"));
|
||||||
else
|
else
|
||||||
stubPath.append(QLatin1String("/qtcreator_process_stub"));
|
stubPath.append(QLatin1String("/qtcreator_process_stub"));
|
||||||
@@ -363,7 +363,7 @@ static const Terminal knownTerminals[] =
|
|||||||
|
|
||||||
QString ConsoleProcess::defaultTerminalEmulator()
|
QString ConsoleProcess::defaultTerminalEmulator()
|
||||||
{
|
{
|
||||||
if (Utils::HostOsInfo::isMacHost()) {
|
if (HostOsInfo::isMacHost()) {
|
||||||
QString termCmd = QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/scripts/openTerminal.command");
|
QString termCmd = QCoreApplication::applicationDirPath() + QLatin1String("/../Resources/scripts/openTerminal.command");
|
||||||
if (QFile(termCmd).exists())
|
if (QFile(termCmd).exists())
|
||||||
return termCmd.replace(QLatin1Char(' '), QLatin1String("\\ "));
|
return termCmd.replace(QLatin1Char(' '), QLatin1String("\\ "));
|
||||||
|
|||||||
@@ -121,18 +121,18 @@ void CrumblePathButton::paintEvent(QPaintEvent *)
|
|||||||
|
|
||||||
if (m_isEnd) {
|
if (m_isEnd) {
|
||||||
if (m_isPressed || m_isSelected)
|
if (m_isPressed || m_isSelected)
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentSelectedEnd, &p, geom, 2, 0, 2, 0);
|
StyleHelper::drawCornerImage(m_segmentSelectedEnd, &p, geom, 2, 0, 2, 0);
|
||||||
else if (m_isHovering)
|
else if (m_isHovering)
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentHoverEnd, &p, geom, 2, 0, 2, 0);
|
StyleHelper::drawCornerImage(m_segmentHoverEnd, &p, geom, 2, 0, 2, 0);
|
||||||
else
|
else
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentEnd, &p, geom, 2, 0, 2, 0);
|
StyleHelper::drawCornerImage(m_segmentEnd, &p, geom, 2, 0, 2, 0);
|
||||||
} else {
|
} else {
|
||||||
if (m_isPressed || m_isSelected)
|
if (m_isPressed || m_isSelected)
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentSelected, &p, geom, 2, 0, 12, 0);
|
StyleHelper::drawCornerImage(m_segmentSelected, &p, geom, 2, 0, 12, 0);
|
||||||
else if (m_isHovering)
|
else if (m_isHovering)
|
||||||
Utils::StyleHelper::drawCornerImage(m_segmentHover, &p, geom, 2, 0, 12, 0);
|
StyleHelper::drawCornerImage(m_segmentHover, &p, geom, 2, 0, 12, 0);
|
||||||
else
|
else
|
||||||
Utils::StyleHelper::drawCornerImage(m_segment, &p, geom, 2, 0, 12, 0);
|
StyleHelper::drawCornerImage(m_segment, &p, geom, 2, 0, 12, 0);
|
||||||
}
|
}
|
||||||
if (isEnabled())
|
if (isEnabled())
|
||||||
p.setPen(StyleHelper::panelTextColor());
|
p.setPen(StyleHelper::panelTextColor());
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
QLabel *m_summaryLabel;
|
QLabel *m_summaryLabel;
|
||||||
QCheckBox *m_summaryCheckBox;
|
QCheckBox *m_summaryCheckBox;
|
||||||
QLabel *m_additionalSummaryLabel;
|
QLabel *m_additionalSummaryLabel;
|
||||||
Utils::FadingPanel *m_toolWidget;
|
FadingPanel *m_toolWidget;
|
||||||
QWidget *m_widget;
|
QWidget *m_widget;
|
||||||
|
|
||||||
QPixmap m_collapsedPixmap;
|
QPixmap m_collapsedPixmap;
|
||||||
@@ -375,7 +375,7 @@ void DetailsWidget::setWidget(QWidget *widget)
|
|||||||
d->updateControls();
|
d->updateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetailsWidget::setToolWidget(Utils::FadingPanel *widget)
|
void DetailsWidget::setToolWidget(FadingPanel *widget)
|
||||||
{
|
{
|
||||||
if (d->m_toolWidget == widget)
|
if (d->m_toolWidget == widget)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
QWidget *widget() const;
|
QWidget *widget() const;
|
||||||
QWidget *takeWidget();
|
QWidget *takeWidget();
|
||||||
|
|
||||||
void setToolWidget(Utils::FadingPanel *widget);
|
void setToolWidget(FadingPanel *widget);
|
||||||
QWidget *toolWidget() const;
|
QWidget *toolWidget() const;
|
||||||
|
|
||||||
void setSummaryFontBold(bool b);
|
void setSummaryFontBold(bool b);
|
||||||
|
|||||||
@@ -373,23 +373,23 @@ QList<EnvironmentItem> Environment::diff(const Environment &other) const
|
|||||||
QList<EnvironmentItem> result;
|
QList<EnvironmentItem> result;
|
||||||
while (thisIt != constEnd() || otherIt != other.constEnd()) {
|
while (thisIt != constEnd() || otherIt != other.constEnd()) {
|
||||||
if (thisIt == constEnd()) {
|
if (thisIt == constEnd()) {
|
||||||
result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
|
result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
|
||||||
++otherIt;
|
++otherIt;
|
||||||
} else if (otherIt == constEnd()) {
|
} else if (otherIt == constEnd()) {
|
||||||
Utils::EnvironmentItem item(thisIt.key(), QString());
|
EnvironmentItem item(thisIt.key(), QString());
|
||||||
item.unset = true;
|
item.unset = true;
|
||||||
result.append(item);
|
result.append(item);
|
||||||
++thisIt;
|
++thisIt;
|
||||||
} else if (thisIt.key() < otherIt.key()) {
|
} else if (thisIt.key() < otherIt.key()) {
|
||||||
Utils::EnvironmentItem item(thisIt.key(), QString());
|
EnvironmentItem item(thisIt.key(), QString());
|
||||||
item.unset = true;
|
item.unset = true;
|
||||||
result.append(item);
|
result.append(item);
|
||||||
++thisIt;
|
++thisIt;
|
||||||
} else if (thisIt.key() > otherIt.key()) {
|
} else if (thisIt.key() > otherIt.key()) {
|
||||||
result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
|
result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
|
||||||
++otherIt;
|
++otherIt;
|
||||||
} else {
|
} else {
|
||||||
result.append(Utils::EnvironmentItem(otherIt.key(), otherIt.value()));
|
result.append(EnvironmentItem(otherIt.key(), otherIt.value()));
|
||||||
++otherIt;
|
++otherIt;
|
||||||
++thisIt;
|
++thisIt;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public:
|
|||||||
m_resultEnvironment.modify(m_items);
|
m_resultEnvironment.modify(m_items);
|
||||||
// Add removed variables again and mark them as "<UNSET>" so
|
// Add removed variables again and mark them as "<UNSET>" so
|
||||||
// that the user can actually see those removals:
|
// that the user can actually see those removals:
|
||||||
foreach (const Utils::EnvironmentItem &item, m_items) {
|
foreach (const EnvironmentItem &item, m_items) {
|
||||||
if (item.unset)
|
if (item.unset)
|
||||||
m_resultEnvironment.set(item.name, EnvironmentModel::tr("<UNSET>"));
|
m_resultEnvironment.set(item.name, EnvironmentModel::tr("<UNSET>"));
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
int findInResultInsertPosition(const QString &name) const
|
int findInResultInsertPosition(const QString &name) const
|
||||||
{
|
{
|
||||||
Utils::Environment::const_iterator it;
|
Environment::const_iterator it;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
|
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
|
||||||
if (m_resultEnvironment.key(it) > name)
|
if (m_resultEnvironment.key(it) > name)
|
||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
|
|
||||||
int findInResult(const QString &name) const
|
int findInResult(const QString &name) const
|
||||||
{
|
{
|
||||||
Utils::Environment::const_iterator it;
|
Environment::const_iterator it;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
|
for (it = m_resultEnvironment.constBegin(); it != m_resultEnvironment.constEnd(); ++it, ++i)
|
||||||
if (m_resultEnvironment.key(it) == name)
|
if (m_resultEnvironment.key(it) == name)
|
||||||
@@ -81,9 +81,9 @@ public:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::Environment m_baseEnvironment;
|
Environment m_baseEnvironment;
|
||||||
Utils::Environment m_resultEnvironment;
|
Environment m_resultEnvironment;
|
||||||
QList<Utils::EnvironmentItem> m_items;
|
QList<EnvironmentItem> m_items;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
@@ -103,7 +103,7 @@ QString EnvironmentModel::indexToVariable(const QModelIndex &index) const
|
|||||||
return d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row());
|
return d->m_resultEnvironment.key(d->m_resultEnvironment.constBegin() + index.row());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnvironmentModel::setBaseEnvironment(const Utils::Environment &env)
|
void EnvironmentModel::setBaseEnvironment(const Environment &env)
|
||||||
{
|
{
|
||||||
if (d->m_baseEnvironment == env)
|
if (d->m_baseEnvironment == env)
|
||||||
return;
|
return;
|
||||||
@@ -215,7 +215,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
|
|||||||
if (d->m_resultEnvironment.hasKey(newName) || newName.isEmpty())
|
if (d->m_resultEnvironment.hasKey(newName) || newName.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Utils::EnvironmentItem newVariable(newName, oldValue);
|
EnvironmentItem newVariable(newName, oldValue);
|
||||||
|
|
||||||
if (changesPos != -1)
|
if (changesPos != -1)
|
||||||
resetVariable(oldName); // restore the original base variable again
|
resetVariable(oldName); // restore the original base variable again
|
||||||
@@ -238,7 +238,7 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Add a new change item:
|
// Add a new change item:
|
||||||
d->m_items.append(Utils::EnvironmentItem(oldName, stringValue));
|
d->m_items.append(EnvironmentItem(oldName, stringValue));
|
||||||
}
|
}
|
||||||
d->updateResultEnvironment();
|
d->updateResultEnvironment();
|
||||||
emit dataChanged(index, index);
|
emit dataChanged(index, index);
|
||||||
@@ -251,12 +251,12 @@ bool EnvironmentModel::setData(const QModelIndex &index, const QVariant &value,
|
|||||||
QModelIndex EnvironmentModel::addVariable()
|
QModelIndex EnvironmentModel::addVariable()
|
||||||
{
|
{
|
||||||
//: Name when inserting a new variable
|
//: Name when inserting a new variable
|
||||||
return addVariable(Utils::EnvironmentItem(tr("<VARIABLE>"),
|
return addVariable(EnvironmentItem(tr("<VARIABLE>"),
|
||||||
//: Value when inserting a new variable
|
//: Value when inserting a new variable
|
||||||
tr("<VALUE>")));
|
tr("<VALUE>")));
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex EnvironmentModel::addVariable(const Utils::EnvironmentItem &item)
|
QModelIndex EnvironmentModel::addVariable(const EnvironmentItem &item)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Return existing index if the name is already in the result set:
|
// Return existing index if the name is already in the result set:
|
||||||
@@ -331,7 +331,7 @@ void EnvironmentModel::unsetVariable(const QString &name)
|
|||||||
emit userChangesChanged();
|
emit userChangesChanged();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Utils::EnvironmentItem item(name, QString());
|
EnvironmentItem item(name, QString());
|
||||||
item.unset = true;
|
item.unset = true;
|
||||||
d->m_items.append(item);
|
d->m_items.append(item);
|
||||||
d->updateResultEnvironment();
|
d->updateResultEnvironment();
|
||||||
@@ -353,12 +353,12 @@ bool EnvironmentModel::canReset(const QString &name)
|
|||||||
return d->m_baseEnvironment.hasKey(name);
|
return d->m_baseEnvironment.hasKey(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Utils::EnvironmentItem> EnvironmentModel::userChanges() const
|
QList<EnvironmentItem> EnvironmentModel::userChanges() const
|
||||||
{
|
{
|
||||||
return d->m_items;
|
return d->m_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnvironmentModel::setUserChanges(QList<Utils::EnvironmentItem> list)
|
void EnvironmentModel::setUserChanges(QList<EnvironmentItem> list)
|
||||||
{
|
{
|
||||||
// We assume nobody is reordering the items here.
|
// We assume nobody is reordering the items here.
|
||||||
if (list == d->m_items)
|
if (list == d->m_items)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||||
|
|
||||||
QModelIndex addVariable();
|
QModelIndex addVariable();
|
||||||
QModelIndex addVariable(const Utils::EnvironmentItem &item);
|
QModelIndex addVariable(const EnvironmentItem &item);
|
||||||
void resetVariable(const QString &name);
|
void resetVariable(const QString &name);
|
||||||
void unsetVariable(const QString &name);
|
void unsetVariable(const QString &name);
|
||||||
bool canUnset(const QString &name);
|
bool canUnset(const QString &name);
|
||||||
@@ -64,9 +64,9 @@ public:
|
|||||||
QString indexToVariable(const QModelIndex &index) const;
|
QString indexToVariable(const QModelIndex &index) const;
|
||||||
QModelIndex variableToIndex(const QString &name) const;
|
QModelIndex variableToIndex(const QString &name) const;
|
||||||
bool changes(const QString &key) const;
|
bool changes(const QString &key) const;
|
||||||
void setBaseEnvironment(const Utils::Environment &env);
|
void setBaseEnvironment(const Environment &env);
|
||||||
QList<Utils::EnvironmentItem> userChanges() const;
|
QList<EnvironmentItem> userChanges() const;
|
||||||
void setUserChanges(QList<Utils::EnvironmentItem> list);
|
void setUserChanges(QList<EnvironmentItem> list);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void userChangesChanged();
|
void userChangesChanged();
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ private:
|
|||||||
|
|
||||||
void updateMargins();
|
void updateMargins();
|
||||||
void updateButtonPositions();
|
void updateButtonPositions();
|
||||||
friend class Utils::FancyLineEditPrivate;
|
friend class FancyLineEditPrivate;
|
||||||
|
|
||||||
FancyLineEditPrivate *d;
|
FancyLineEditPrivate *d;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,17 +32,199 @@
|
|||||||
#include "qtcassert.h"
|
#include "qtcassert.h"
|
||||||
|
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
#include <QMenu>
|
#include <QDebug>
|
||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QIcon>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QPainter>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QStyleOption>
|
||||||
|
#include <QToolButton>
|
||||||
|
|
||||||
static const char lockedKeyC[] = "Locked";
|
|
||||||
static const char stateKeyC[] = "State";
|
static const char stateKeyC[] = "State";
|
||||||
static const int settingsVersion = 2;
|
static const int settingsVersion = 2;
|
||||||
static const char dockWidgetActiveState[] = "DockWidgetActiveState";
|
static const char dockWidgetActiveState[] = "DockWidgetActiveState";
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
|
// Stolen from QDockWidgetTitleButton
|
||||||
|
class DockWidgetTitleButton : public QAbstractButton
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DockWidgetTitleButton(QWidget *parent)
|
||||||
|
: QAbstractButton(parent)
|
||||||
|
{
|
||||||
|
setFocusPolicy(Qt::NoFocus);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize sizeHint() const
|
||||||
|
{
|
||||||
|
ensurePolished();
|
||||||
|
|
||||||
|
int size = 2*style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin, 0, this);
|
||||||
|
if (!icon().isNull()) {
|
||||||
|
int iconSize = style()->pixelMetric(QStyle::PM_SmallIconSize, 0, this);
|
||||||
|
QSize sz = icon().actualSize(QSize(iconSize, iconSize));
|
||||||
|
size += qMax(sz.width(), sz.height());
|
||||||
|
}
|
||||||
|
|
||||||
|
return QSize(size, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize minimumSizeHint() const { return sizeHint(); }
|
||||||
|
|
||||||
|
void enterEvent(QEvent *event)
|
||||||
|
{
|
||||||
|
if (isEnabled()) update();
|
||||||
|
QAbstractButton::enterEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void leaveEvent(QEvent *event)
|
||||||
|
{
|
||||||
|
if (isEnabled()) update();
|
||||||
|
QAbstractButton::leaveEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
};
|
||||||
|
|
||||||
|
void DockWidgetTitleButton::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
|
||||||
|
QStyleOptionToolButton opt;
|
||||||
|
opt.init(this);
|
||||||
|
opt.state |= QStyle::State_AutoRaise;
|
||||||
|
opt.icon = icon();
|
||||||
|
opt.subControls = 0;
|
||||||
|
opt.activeSubControls = 0;
|
||||||
|
opt.features = QStyleOptionToolButton::None;
|
||||||
|
opt.arrowType = Qt::NoArrow;
|
||||||
|
int size = style()->pixelMetric(QStyle::PM_SmallIconSize, 0, this);
|
||||||
|
opt.iconSize = QSize(size, size);
|
||||||
|
style()->drawComplexControl(QStyle::CC_ToolButton, &opt, &p, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class TitleBarWidget : public QWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TitleBarWidget(QDockWidget *parent, const QStyleOptionDockWidget &opt)
|
||||||
|
: QWidget(parent), q(parent), m_active(true)
|
||||||
|
{
|
||||||
|
m_titleLabel = new QLabel(this);
|
||||||
|
|
||||||
|
m_floatButton = new DockWidgetTitleButton(this);
|
||||||
|
m_floatButton->setIcon(q->style()->standardIcon(QStyle::SP_TitleBarNormalButton, &opt, q));
|
||||||
|
m_floatButton->setAccessibleName(QDockWidget::tr("Float"));
|
||||||
|
m_floatButton->setAccessibleDescription(QDockWidget::tr("Undocks and re-attaches the dock widget"));
|
||||||
|
|
||||||
|
m_closeButton = new DockWidgetTitleButton(this);
|
||||||
|
m_closeButton->setIcon(q->style()->standardIcon(QStyle::SP_TitleBarCloseButton, &opt, q));
|
||||||
|
m_closeButton->setAccessibleName(QDockWidget::tr("Close"));
|
||||||
|
m_closeButton->setAccessibleDescription(QDockWidget::tr("Closes the dock widget"));
|
||||||
|
|
||||||
|
setActive(false);
|
||||||
|
|
||||||
|
const int minWidth = 10;
|
||||||
|
const int maxWidth = 10000;
|
||||||
|
const int inactiveHeight = 3;
|
||||||
|
const int activeHeight = m_closeButton->sizeHint().height() + 2;
|
||||||
|
|
||||||
|
m_minimumInactiveSize = QSize(minWidth, inactiveHeight);
|
||||||
|
m_maximumInactiveSize = QSize(maxWidth, inactiveHeight);
|
||||||
|
m_minimumActiveSize = QSize(minWidth, activeHeight);
|
||||||
|
m_maximumActiveSize = QSize(maxWidth, activeHeight);
|
||||||
|
|
||||||
|
auto layout = new QHBoxLayout(this);
|
||||||
|
layout->setMargin(0);
|
||||||
|
layout->setSpacing(0);
|
||||||
|
layout->setContentsMargins(4, 0, 0, 0);
|
||||||
|
layout->addWidget(m_titleLabel);
|
||||||
|
layout->addStretch();
|
||||||
|
layout->addWidget(m_floatButton);
|
||||||
|
layout->addWidget(m_closeButton);
|
||||||
|
setLayout(layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
void enterEvent(QEvent *event)
|
||||||
|
{
|
||||||
|
setActive(true);
|
||||||
|
QWidget::enterEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void leaveEvent(QEvent *event)
|
||||||
|
{
|
||||||
|
if (!q->isFloating())
|
||||||
|
setActive(false);
|
||||||
|
QWidget::leaveEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setActive(bool on)
|
||||||
|
{
|
||||||
|
if (m_active == on)
|
||||||
|
return;
|
||||||
|
m_active = on;
|
||||||
|
m_titleLabel->setVisible(on);
|
||||||
|
m_floatButton->setVisible(on);
|
||||||
|
m_closeButton->setVisible(on);
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize sizeHint() const
|
||||||
|
{
|
||||||
|
ensurePolished();
|
||||||
|
return m_active ? m_maximumActiveSize : m_maximumInactiveSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize minimumSizeHint() const
|
||||||
|
{
|
||||||
|
ensurePolished();
|
||||||
|
return m_active ? m_minimumActiveSize : m_minimumInactiveSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
QDockWidget *q;
|
||||||
|
bool m_active;
|
||||||
|
QSize m_minimumActiveSize;
|
||||||
|
QSize m_maximumActiveSize;
|
||||||
|
QSize m_minimumInactiveSize;
|
||||||
|
QSize m_maximumInactiveSize;
|
||||||
|
|
||||||
|
QLabel *m_titleLabel;
|
||||||
|
DockWidgetTitleButton *m_floatButton;
|
||||||
|
DockWidgetTitleButton *m_closeButton;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class DockWidget : public QDockWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DockWidget(QWidget *inner, QWidget *parent)
|
||||||
|
: QDockWidget(parent)
|
||||||
|
{
|
||||||
|
setWidget(inner);
|
||||||
|
setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable);
|
||||||
|
setObjectName(inner->objectName() + QLatin1String("DockWidget"));
|
||||||
|
setWindowTitle(inner->windowTitle());
|
||||||
|
|
||||||
|
QStyleOptionDockWidget opt;
|
||||||
|
initStyleOption(&opt);
|
||||||
|
auto titleBar = new TitleBarWidget(this, opt);
|
||||||
|
titleBar->m_titleLabel->setText(inner->windowTitle());
|
||||||
|
setTitleBarWidget(titleBar);
|
||||||
|
|
||||||
|
auto origFloatButton = findChild<QAbstractButton *>(QLatin1String("qt_dockwidget_floatbutton"));
|
||||||
|
connect(titleBar->m_floatButton, SIGNAL(clicked()), origFloatButton, SIGNAL(clicked()));
|
||||||
|
|
||||||
|
auto origCloseButton = findChild<QAbstractButton *>(QLatin1String("qt_dockwidget_closebutton"));
|
||||||
|
connect(titleBar->m_closeButton, SIGNAL(clicked()), origCloseButton, SIGNAL(clicked()));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/*! \class Utils::FancyMainWindow
|
/*! \class Utils::FancyMainWindow
|
||||||
|
|
||||||
\brief The FancyMainWindow class is a MainWindow with dock widgets and
|
\brief The FancyMainWindow class is a MainWindow with dock widgets and
|
||||||
@@ -53,40 +235,30 @@ namespace Utils {
|
|||||||
in a Window-menu.
|
in a Window-menu.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct FancyMainWindowPrivate
|
class FancyMainWindowPrivate
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
FancyMainWindowPrivate();
|
FancyMainWindowPrivate();
|
||||||
|
|
||||||
bool m_locked;
|
|
||||||
bool m_handleDockVisibilityChanges;
|
bool m_handleDockVisibilityChanges;
|
||||||
|
|
||||||
QAction m_menuSeparator1;
|
QAction m_menuSeparator;
|
||||||
QAction m_toggleLockedAction;
|
|
||||||
QAction m_menuSeparator2;
|
|
||||||
QAction m_resetLayoutAction;
|
QAction m_resetLayoutAction;
|
||||||
QDockWidget *m_toolBarDockWidget;
|
QDockWidget *m_toolBarDockWidget;
|
||||||
};
|
};
|
||||||
|
|
||||||
FancyMainWindowPrivate::FancyMainWindowPrivate() :
|
FancyMainWindowPrivate::FancyMainWindowPrivate() :
|
||||||
m_locked(true),
|
|
||||||
m_handleDockVisibilityChanges(true),
|
m_handleDockVisibilityChanges(true),
|
||||||
m_menuSeparator1(0),
|
m_menuSeparator(0),
|
||||||
m_toggleLockedAction(FancyMainWindow::tr("Locked"), 0),
|
|
||||||
m_menuSeparator2(0),
|
|
||||||
m_resetLayoutAction(FancyMainWindow::tr("Reset to Default Layout"), 0),
|
m_resetLayoutAction(FancyMainWindow::tr("Reset to Default Layout"), 0),
|
||||||
m_toolBarDockWidget(0)
|
m_toolBarDockWidget(0)
|
||||||
{
|
{
|
||||||
m_toggleLockedAction.setCheckable(true);
|
m_menuSeparator.setSeparator(true);
|
||||||
m_toggleLockedAction.setChecked(m_locked);
|
|
||||||
m_menuSeparator1.setSeparator(true);
|
|
||||||
m_menuSeparator2.setSeparator(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FancyMainWindow::FancyMainWindow(QWidget *parent) :
|
FancyMainWindow::FancyMainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent), d(new FancyMainWindowPrivate)
|
QMainWindow(parent), d(new FancyMainWindowPrivate)
|
||||||
{
|
{
|
||||||
connect(&d->m_toggleLockedAction, SIGNAL(toggled(bool)),
|
|
||||||
this, SLOT(setLocked(bool)));
|
|
||||||
connect(&d->m_resetLayoutAction, SIGNAL(triggered()),
|
connect(&d->m_resetLayoutAction, SIGNAL(triggered()),
|
||||||
this, SIGNAL(resetLayout()));
|
this, SIGNAL(resetLayout()));
|
||||||
}
|
}
|
||||||
@@ -98,41 +270,18 @@ FancyMainWindow::~FancyMainWindow()
|
|||||||
|
|
||||||
QDockWidget *FancyMainWindow::addDockForWidget(QWidget *widget)
|
QDockWidget *FancyMainWindow::addDockForWidget(QWidget *widget)
|
||||||
{
|
{
|
||||||
QDockWidget *dockWidget = new QDockWidget(widget->windowTitle(), this);
|
QTC_ASSERT(widget, return 0);
|
||||||
dockWidget->setWidget(widget);
|
QTC_CHECK(widget->objectName().size());
|
||||||
// Set an object name to be used in settings, derive from widget name
|
QTC_CHECK(widget->windowTitle().size());
|
||||||
const QString objectName = widget->objectName();
|
|
||||||
if (objectName.isEmpty())
|
auto dockWidget = new DockWidget(widget, this);
|
||||||
dockWidget->setObjectName(QLatin1String("dockWidget") + QString::number(dockWidgets().size() + 1));
|
|
||||||
else
|
|
||||||
dockWidget->setObjectName(objectName + QLatin1String("DockWidget"));
|
|
||||||
connect(dockWidget->toggleViewAction(), SIGNAL(triggered()),
|
connect(dockWidget->toggleViewAction(), SIGNAL(triggered()),
|
||||||
this, SLOT(onDockActionTriggered()), Qt::QueuedConnection);
|
this, SLOT(onDockActionTriggered()), Qt::QueuedConnection);
|
||||||
connect(dockWidget, SIGNAL(visibilityChanged(bool)),
|
connect(dockWidget, SIGNAL(visibilityChanged(bool)),
|
||||||
this, SLOT(onDockVisibilityChange(bool)));
|
this, SLOT(onDockVisibilityChange(bool)));
|
||||||
connect(dockWidget, SIGNAL(topLevelChanged(bool)),
|
|
||||||
this, SLOT(onTopLevelChanged()));
|
|
||||||
dockWidget->setProperty(dockWidgetActiveState, true);
|
dockWidget->setProperty(dockWidgetActiveState, true);
|
||||||
updateDockWidget(dockWidget);
|
|
||||||
return dockWidget;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FancyMainWindow::updateDockWidget(QDockWidget *dockWidget)
|
return dockWidget;
|
||||||
{
|
|
||||||
const QDockWidget::DockWidgetFeatures features =
|
|
||||||
(d->m_locked) ? QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable
|
|
||||||
: QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetFloatable;
|
|
||||||
if (dockWidget->property("managed_dockwidget").isNull()) { // for the debugger tool bar
|
|
||||||
QWidget *titleBarWidget = dockWidget->titleBarWidget();
|
|
||||||
if (d->m_locked && !titleBarWidget && !dockWidget->isFloating()) {
|
|
||||||
titleBarWidget = new QWidget(dockWidget);
|
|
||||||
} else if ((!d->m_locked || dockWidget->isFloating()) && titleBarWidget) {
|
|
||||||
delete titleBarWidget;
|
|
||||||
titleBarWidget = 0;
|
|
||||||
}
|
|
||||||
dockWidget->setTitleBarWidget(titleBarWidget);
|
|
||||||
}
|
|
||||||
dockWidget->setFeatures(features);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FancyMainWindow::onDockActionTriggered()
|
void FancyMainWindow::onDockActionTriggered()
|
||||||
@@ -150,11 +299,6 @@ void FancyMainWindow::onDockVisibilityChange(bool visible)
|
|||||||
sender()->setProperty(dockWidgetActiveState, visible);
|
sender()->setProperty(dockWidgetActiveState, visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FancyMainWindow::onTopLevelChanged()
|
|
||||||
{
|
|
||||||
updateDockWidget(qobject_cast<QDockWidget*>(sender()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void FancyMainWindow::setTrackingEnabled(bool enabled)
|
void FancyMainWindow::setTrackingEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
@@ -166,14 +310,6 @@ void FancyMainWindow::setTrackingEnabled(bool enabled)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FancyMainWindow::setLocked(bool locked)
|
|
||||||
{
|
|
||||||
d->m_locked = locked;
|
|
||||||
foreach (QDockWidget *dockWidget, dockWidgets()) {
|
|
||||||
updateDockWidget(dockWidget);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FancyMainWindow::hideEvent(QHideEvent *event)
|
void FancyMainWindow::hideEvent(QHideEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
Q_UNUSED(event)
|
||||||
@@ -229,7 +365,6 @@ QHash<QString, QVariant> FancyMainWindow::saveSettings() const
|
|||||||
{
|
{
|
||||||
QHash<QString, QVariant> settings;
|
QHash<QString, QVariant> settings;
|
||||||
settings.insert(QLatin1String(stateKeyC), saveState(settingsVersion));
|
settings.insert(QLatin1String(stateKeyC), saveState(settingsVersion));
|
||||||
settings.insert(QLatin1String(lockedKeyC), d->m_locked);
|
|
||||||
foreach (QDockWidget *dockWidget, dockWidgets()) {
|
foreach (QDockWidget *dockWidget, dockWidgets()) {
|
||||||
settings.insert(dockWidget->objectName(),
|
settings.insert(dockWidget->objectName(),
|
||||||
dockWidget->property(dockWidgetActiveState));
|
dockWidget->property(dockWidgetActiveState));
|
||||||
@@ -242,8 +377,6 @@ void FancyMainWindow::restoreSettings(const QHash<QString, QVariant> &settings)
|
|||||||
QByteArray ba = settings.value(QLatin1String(stateKeyC), QByteArray()).toByteArray();
|
QByteArray ba = settings.value(QLatin1String(stateKeyC), QByteArray()).toByteArray();
|
||||||
if (!ba.isEmpty())
|
if (!ba.isEmpty())
|
||||||
restoreState(ba, settingsVersion);
|
restoreState(ba, settingsVersion);
|
||||||
d->m_locked = settings.value(QLatin1String("Locked"), true).toBool();
|
|
||||||
d->m_toggleLockedAction.setChecked(d->m_locked);
|
|
||||||
foreach (QDockWidget *widget, dockWidgets()) {
|
foreach (QDockWidget *widget, dockWidgets()) {
|
||||||
widget->setProperty(dockWidgetActiveState,
|
widget->setProperty(dockWidgetActiveState,
|
||||||
settings.value(widget->objectName(), false));
|
settings.value(widget->objectName(), false));
|
||||||
@@ -255,11 +388,6 @@ QList<QDockWidget *> FancyMainWindow::dockWidgets() const
|
|||||||
return findChildren<QDockWidget *>();
|
return findChildren<QDockWidget *>();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FancyMainWindow::isLocked() const
|
|
||||||
{
|
|
||||||
return d->m_locked;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool actionLessThan(const QAction *action1, const QAction *action2)
|
static bool actionLessThan(const QAction *action1, const QAction *action2)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(action1, return true);
|
QTC_ASSERT(action1, return true);
|
||||||
@@ -282,26 +410,14 @@ QMenu *FancyMainWindow::createPopupMenu()
|
|||||||
QMenu *menu = new QMenu(this);
|
QMenu *menu = new QMenu(this);
|
||||||
foreach (QAction *action, actions)
|
foreach (QAction *action, actions)
|
||||||
menu->addAction(action);
|
menu->addAction(action);
|
||||||
menu->addAction(&d->m_menuSeparator1);
|
menu->addAction(&d->m_menuSeparator);
|
||||||
menu->addAction(&d->m_toggleLockedAction);
|
|
||||||
menu->addAction(&d->m_menuSeparator2);
|
|
||||||
menu->addAction(&d->m_resetLayoutAction);
|
menu->addAction(&d->m_resetLayoutAction);
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *FancyMainWindow::menuSeparator1() const
|
QAction *FancyMainWindow::menuSeparator() const
|
||||||
{
|
{
|
||||||
return &d->m_menuSeparator1;
|
return &d->m_menuSeparator;
|
||||||
}
|
|
||||||
|
|
||||||
QAction *FancyMainWindow::toggleLockedAction() const
|
|
||||||
{
|
|
||||||
return &d->m_toggleLockedAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
QAction *FancyMainWindow::menuSeparator2() const
|
|
||||||
{
|
|
||||||
return &d->m_menuSeparator2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *FancyMainWindow::resetLayoutAction() const
|
QAction *FancyMainWindow::resetLayoutAction() const
|
||||||
@@ -313,9 +429,7 @@ void FancyMainWindow::setDockActionsVisible(bool v)
|
|||||||
{
|
{
|
||||||
foreach (const QDockWidget *dockWidget, dockWidgets())
|
foreach (const QDockWidget *dockWidget, dockWidgets())
|
||||||
dockWidget->toggleViewAction()->setVisible(v);
|
dockWidget->toggleViewAction()->setVisible(v);
|
||||||
d->m_toggleLockedAction.setVisible(v);
|
d->m_menuSeparator.setVisible(v);
|
||||||
d->m_menuSeparator1.setVisible(v);
|
|
||||||
d->m_menuSeparator2.setVisible(v);
|
|
||||||
d->m_resetLayoutAction.setVisible(v);
|
d->m_resetLayoutAction.setVisible(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ QT_END_NAMESPACE
|
|||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
struct FancyMainWindowPrivate;
|
class FancyMainWindowPrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT FancyMainWindow : public QMainWindow
|
class QTCREATOR_UTILS_EXPORT FancyMainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
@@ -56,7 +56,6 @@ public:
|
|||||||
QList<QDockWidget *> dockWidgets() const;
|
QList<QDockWidget *> dockWidgets() const;
|
||||||
|
|
||||||
void setTrackingEnabled(bool enabled);
|
void setTrackingEnabled(bool enabled);
|
||||||
bool isLocked() const;
|
|
||||||
|
|
||||||
void saveSettings(QSettings *settings) const;
|
void saveSettings(QSettings *settings) const;
|
||||||
void restoreSettings(const QSettings *settings);
|
void restoreSettings(const QSettings *settings);
|
||||||
@@ -64,15 +63,12 @@ public:
|
|||||||
void restoreSettings(const QHash<QString, QVariant> &settings);
|
void restoreSettings(const QHash<QString, QVariant> &settings);
|
||||||
|
|
||||||
// Additional context menu actions
|
// Additional context menu actions
|
||||||
QAction *menuSeparator1() const;
|
QAction *menuSeparator() const;
|
||||||
QAction *toggleLockedAction() const;
|
|
||||||
QAction *menuSeparator2() const;
|
|
||||||
QAction *resetLayoutAction() const;
|
QAction *resetLayoutAction() const;
|
||||||
|
|
||||||
// Overwritten to add locked/reset.
|
// Overwritten to add locked/reset.
|
||||||
virtual QMenu *createPopupMenu();
|
virtual QMenu *createPopupMenu();
|
||||||
|
|
||||||
|
|
||||||
QDockWidget *toolBarDockWidget() const;
|
QDockWidget *toolBarDockWidget() const;
|
||||||
void setToolBarDockWidget(QDockWidget *dock);
|
void setToolBarDockWidget(QDockWidget *dock);
|
||||||
|
|
||||||
@@ -82,20 +78,18 @@ signals:
|
|||||||
void resetLayout();
|
void resetLayout();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setLocked(bool locked);
|
|
||||||
void setDockActionsVisible(bool v);
|
void setDockActionsVisible(bool v);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void hideEvent(QHideEvent *event);
|
void hideEvent(QHideEvent *event);
|
||||||
void showEvent(QShowEvent *event);
|
void showEvent(QShowEvent *event);
|
||||||
void contextMenuEvent(QContextMenuEvent *event);
|
void contextMenuEvent(QContextMenuEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onDockActionTriggered();
|
void onDockActionTriggered();
|
||||||
void onDockVisibilityChange(bool);
|
void onDockVisibilityChange(bool);
|
||||||
void onTopLevelChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateDockWidget(QDockWidget *dockWidget);
|
|
||||||
void handleVisibilityChanged(bool visible);
|
void handleVisibilityChanged(bool visible);
|
||||||
|
|
||||||
FancyMainWindowPrivate *d;
|
FancyMainWindowPrivate *d;
|
||||||
|
|||||||
@@ -644,7 +644,7 @@ bool FileName::isChildOf(const FileName &s) const
|
|||||||
/// \overload
|
/// \overload
|
||||||
bool FileName::isChildOf(const QDir &dir) const
|
bool FileName::isChildOf(const QDir &dir) const
|
||||||
{
|
{
|
||||||
return isChildOf(Utils::FileName::fromString(dir.absolutePath()));
|
return isChildOf(FileName::fromString(dir.absolutePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \returns whether FileName endsWith \a s
|
/// \returns whether FileName endsWith \a s
|
||||||
@@ -659,7 +659,7 @@ bool FileName::endsWith(const QString &s) const
|
|||||||
FileName FileName::relativeChildPath(const FileName &parent) const
|
FileName FileName::relativeChildPath(const FileName &parent) const
|
||||||
{
|
{
|
||||||
if (!isChildOf(parent))
|
if (!isChildOf(parent))
|
||||||
return Utils::FileName();
|
return FileName();
|
||||||
return FileName(QString::mid(parent.size() + 1, -1));
|
return FileName(QString::mid(parent.size() + 1, -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ public:
|
|||||||
bool isChildOf(const QDir &dir) const;
|
bool isChildOf(const QDir &dir) const;
|
||||||
bool endsWith(const QString &s) const;
|
bool endsWith(const QString &s) const;
|
||||||
|
|
||||||
Utils::FileName relativeChildPath(const FileName &parent) const;
|
FileName relativeChildPath(const FileName &parent) const;
|
||||||
Utils::FileName &appendPath(const QString &s);
|
FileName &appendPath(const QString &s);
|
||||||
Utils::FileName &appendString(const QString &str);
|
FileName &appendString(const QString &str);
|
||||||
Utils::FileName &appendString(QChar str);
|
FileName &appendString(QChar str);
|
||||||
|
|
||||||
using QString::size;
|
using QString::size;
|
||||||
using QString::count;
|
using QString::count;
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ FileWizardPage::FileWizardPage(QWidget *parent) :
|
|||||||
connect(d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
|
connect(d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
|
||||||
connect(d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
|
connect(d->m_ui.nameLineEdit, SIGNAL(validReturnPressed()), this, SLOT(slotActivated()));
|
||||||
|
|
||||||
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Location"));
|
setProperty(SHORT_TITLE_PROPERTY, tr("Location"));
|
||||||
}
|
}
|
||||||
|
|
||||||
FileWizardPage::~FileWizardPage()
|
FileWizardPage::~FileWizardPage()
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ bool IpAddressLineEdit::validate(const QString &value, QString *errorMessage) co
|
|||||||
|
|
||||||
void IpAddressLineEdit::handleChanged(const QString &t)
|
void IpAddressLineEdit::handleChanged(const QString &t)
|
||||||
{
|
{
|
||||||
Utils::FancyLineEdit::handleChanged(t);
|
FancyLineEdit::handleChanged(t);
|
||||||
if (isValid())
|
if (isValid())
|
||||||
emit validAddressChanged(t);
|
emit validAddressChanged(t);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace Utils {
|
|||||||
|
|
||||||
class IpAddressLineEditPrivate;
|
class IpAddressLineEditPrivate;
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT IpAddressLineEdit : public Utils::FancyLineEdit
|
class QTCREATOR_UTILS_EXPORT IpAddressLineEdit : public FancyLineEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
@@ -398,22 +398,22 @@ public:
|
|||||||
JsonSchemaManager(const QStringList &searchPaths);
|
JsonSchemaManager(const QStringList &searchPaths);
|
||||||
~JsonSchemaManager();
|
~JsonSchemaManager();
|
||||||
|
|
||||||
Utils::JsonSchema *schemaForFile(const QString &fileName) const;
|
JsonSchema *schemaForFile(const QString &fileName) const;
|
||||||
Utils::JsonSchema *schemaByName(const QString &baseName) const;
|
JsonSchema *schemaByName(const QString &baseName) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct JsonSchemaData
|
struct JsonSchemaData
|
||||||
{
|
{
|
||||||
JsonSchemaData(const QString &absoluteFileName, Utils::JsonSchema *schema = 0)
|
JsonSchemaData(const QString &absoluteFileName, JsonSchema *schema = 0)
|
||||||
: m_absoluteFileName(absoluteFileName)
|
: m_absoluteFileName(absoluteFileName)
|
||||||
, m_schema(schema)
|
, m_schema(schema)
|
||||||
{}
|
{}
|
||||||
QString m_absoluteFileName;
|
QString m_absoluteFileName;
|
||||||
Utils::JsonSchema *m_schema;
|
JsonSchema *m_schema;
|
||||||
QDateTime m_lastParseAttempt;
|
QDateTime m_lastParseAttempt;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils::JsonSchema *parseSchema(const QString &schemaFileName) const;
|
JsonSchema *parseSchema(const QString &schemaFileName) const;
|
||||||
|
|
||||||
QStringList m_searchPaths;
|
QStringList m_searchPaths;
|
||||||
mutable QHash<QString, JsonSchemaData> m_schemas;
|
mutable QHash<QString, JsonSchemaData> m_schemas;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
class QTCREATOR_UTILS_EXPORT NavigationTreeView : public Utils::TreeView
|
class QTCREATOR_UTILS_EXPORT NavigationTreeView : public TreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ QString BinaryVersionToolTipEventFilter::toolVersion(const QString &binary, cons
|
|||||||
if (!proc.waitForStarted())
|
if (!proc.waitForStarted())
|
||||||
return QString();
|
return QString();
|
||||||
if (!proc.waitForFinished()) {
|
if (!proc.waitForFinished()) {
|
||||||
Utils::SynchronousProcess::stopProcess(proc);
|
SynchronousProcess::stopProcess(proc);
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
return QString::fromLocal8Bit(QByteArray(proc.readAllStandardOutput()
|
return QString::fromLocal8Bit(QByteArray(proc.readAllStandardOutput()
|
||||||
@@ -271,7 +271,7 @@ void PathChooser::insertButton(int index, const QString &text, QObject *receiver
|
|||||||
d->m_buttons.insert(index, button);
|
d->m_buttons.insert(index, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Utils::PathChooser::browseButtonLabel()
|
QString PathChooser::browseButtonLabel()
|
||||||
{
|
{
|
||||||
return HostOsInfo::isMacHost() ? tr("Choose...") : tr("Browse...");
|
return HostOsInfo::isMacHost() ? tr("Choose...") : tr("Browse...");
|
||||||
}
|
}
|
||||||
@@ -296,7 +296,7 @@ void PathChooser::setBaseDirectory(const QString &directory)
|
|||||||
|
|
||||||
FileName PathChooser::baseFileName() const
|
FileName PathChooser::baseFileName() const
|
||||||
{
|
{
|
||||||
return Utils::FileName::fromString(d->m_baseDirectory);
|
return FileName::fromString(d->m_baseDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setBaseFileName(const FileName &base)
|
void PathChooser::setBaseFileName(const FileName &base)
|
||||||
@@ -305,7 +305,7 @@ void PathChooser::setBaseFileName(const FileName &base)
|
|||||||
triggerChanged();
|
triggerChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setEnvironment(const Utils::Environment &env)
|
void PathChooser::setEnvironment(const Environment &env)
|
||||||
{
|
{
|
||||||
QString oldExpand = path();
|
QString oldExpand = path();
|
||||||
d->m_environment = env;
|
d->m_environment = env;
|
||||||
@@ -327,7 +327,7 @@ QString PathChooser::rawPath() const
|
|||||||
|
|
||||||
FileName PathChooser::fileName() const
|
FileName PathChooser::fileName() const
|
||||||
{
|
{
|
||||||
return Utils::FileName::fromString(path());
|
return FileName::fromString(path());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setPath(const QString &path)
|
void PathChooser::setPath(const QString &path)
|
||||||
@@ -335,7 +335,7 @@ void PathChooser::setPath(const QString &path)
|
|||||||
d->m_lineEdit->setText(QDir::toNativeSeparators(path));
|
d->m_lineEdit->setText(QDir::toNativeSeparators(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathChooser::setFileName(const Utils::FileName &fn)
|
void PathChooser::setFileName(const FileName &fn)
|
||||||
{
|
{
|
||||||
d->m_lineEdit->setText(fn.toUserOutput());
|
d->m_lineEdit->setText(fn.toUserOutput());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,15 +94,15 @@ public:
|
|||||||
|
|
||||||
QString path() const;
|
QString path() const;
|
||||||
QString rawPath() const; // The raw unexpanded input.
|
QString rawPath() const; // The raw unexpanded input.
|
||||||
Utils::FileName fileName() const;
|
FileName fileName() const;
|
||||||
|
|
||||||
QString baseDirectory() const;
|
QString baseDirectory() const;
|
||||||
void setBaseDirectory(const QString &directory);
|
void setBaseDirectory(const QString &directory);
|
||||||
|
|
||||||
Utils::FileName baseFileName() const;
|
FileName baseFileName() const;
|
||||||
void setBaseFileName(const Utils::FileName &base);
|
void setBaseFileName(const FileName &base);
|
||||||
|
|
||||||
void setEnvironment(const Utils::Environment &env);
|
void setEnvironment(const Environment &env);
|
||||||
|
|
||||||
/** Returns the suggested label title when used in a form layout. */
|
/** Returns the suggested label title when used in a form layout. */
|
||||||
static QString label();
|
static QString label();
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ QVariantMap PersistentSettingsReader::restoreValues() const
|
|||||||
return m_valueMap;
|
return m_valueMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PersistentSettingsReader::load(const Utils::FileName &fileName)
|
bool PersistentSettingsReader::load(const FileName &fileName)
|
||||||
{
|
{
|
||||||
m_valueMap.clear();
|
m_valueMap.clear();
|
||||||
|
|
||||||
@@ -442,7 +442,7 @@ bool PersistentSettingsWriter::write(const QVariantMap &data, QWidget *parent) c
|
|||||||
{
|
{
|
||||||
QDir tmp;
|
QDir tmp;
|
||||||
tmp.mkpath(m_fileName.toFileInfo().path());
|
tmp.mkpath(m_fileName.toFileInfo().path());
|
||||||
Utils::FileSaver saver(m_fileName.toString(), QIODevice::Text);
|
FileSaver saver(m_fileName.toString(), QIODevice::Text);
|
||||||
if (!saver.hasError()) {
|
if (!saver.hasError()) {
|
||||||
const Context ctx;
|
const Context ctx;
|
||||||
QXmlStreamWriter w(saver.file());
|
QXmlStreamWriter w(saver.file());
|
||||||
|
|||||||
@@ -60,12 +60,12 @@ public:
|
|||||||
|
|
||||||
bool save(const QVariantMap &data, QWidget *parent) const;
|
bool save(const QVariantMap &data, QWidget *parent) const;
|
||||||
|
|
||||||
Utils::FileName fileName() const;
|
FileName fileName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool write(const QVariantMap &data, QWidget *parent) const;
|
bool write(const QVariantMap &data, QWidget *parent) const;
|
||||||
|
|
||||||
const Utils::FileName m_fileName;
|
const FileName m_fileName;
|
||||||
const QString m_docType;
|
const QString m_docType;
|
||||||
mutable QMap<QString, QVariant> m_savedData;
|
mutable QMap<QString, QVariant> m_savedData;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,9 +34,9 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
using namespace Utils;
|
namespace Utils {
|
||||||
|
|
||||||
QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QString &fileName,
|
QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &fileName,
|
||||||
bool modified,
|
bool modified,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
{
|
{
|
||||||
@@ -56,7 +56,7 @@ QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QStri
|
|||||||
return reloadPrompt(title, msg, QDir::toNativeSeparators(fileName), parent);
|
return reloadPrompt(title, msg, QDir::toNativeSeparators(fileName), parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QString &title,
|
QTCREATOR_UTILS_EXPORT ReloadPromptAnswer reloadPrompt(const QString &title,
|
||||||
const QString &prompt,
|
const QString &prompt,
|
||||||
const QString &details,
|
const QString &details,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
@@ -84,8 +84,8 @@ QTCREATOR_UTILS_EXPORT Utils::ReloadPromptAnswer Utils::reloadPrompt(const QStri
|
|||||||
return ReloadNone;
|
return ReloadNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTCREATOR_UTILS_EXPORT Utils::FileDeletedPromptAnswer
|
QTCREATOR_UTILS_EXPORT FileDeletedPromptAnswer
|
||||||
Utils::fileDeletedPrompt(const QString &fileName, bool triggerExternally, QWidget *parent)
|
fileDeletedPrompt(const QString &fileName, bool triggerExternally, QWidget *parent)
|
||||||
{
|
{
|
||||||
const QString title = QCoreApplication::translate("Utils::fileDeletedPrompt",
|
const QString title = QCoreApplication::translate("Utils::fileDeletedPrompt",
|
||||||
"File has been removed");
|
"File has been removed");
|
||||||
@@ -127,3 +127,5 @@ QTCREATOR_UTILS_EXPORT Utils::FileDeletedPromptAnswer
|
|||||||
return FileDeletedSave;
|
return FileDeletedSave;
|
||||||
return FileDeletedClose;
|
return FileDeletedClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Utils
|
||||||
|
|||||||
@@ -270,9 +270,9 @@ void TcpPortsGatherer::update(QAbstractSocket::NetworkLayerProtocol protocol)
|
|||||||
d->protocol = protocol;
|
d->protocol = protocol;
|
||||||
d->usedPorts.clear();
|
d->usedPorts.clear();
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isWindowsHost())
|
if (HostOsInfo::isWindowsHost())
|
||||||
d->updateWin();
|
d->updateWin();
|
||||||
else if (Utils::HostOsInfo::isLinuxHost())
|
else if (HostOsInfo::isLinuxHost())
|
||||||
d->updateLinux();
|
d->updateLinux();
|
||||||
else
|
else
|
||||||
d->updateNetstat();
|
d->updateNetstat();
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ TextFileFormat::ReadResult readTextFile(const QString &fileName, const QTextCode
|
|||||||
|
|
||||||
QByteArray data;
|
QByteArray data;
|
||||||
try {
|
try {
|
||||||
Utils::FileReader reader;
|
FileReader reader;
|
||||||
if (!reader.fetch(fileName, errorString))
|
if (!reader.fetch(fileName, errorString))
|
||||||
return TextFileFormat::ReadIOError;
|
return TextFileFormat::ReadIOError;
|
||||||
data = reader.data();
|
data = reader.data();
|
||||||
@@ -277,16 +277,16 @@ TextFileFormat::ReadResult TextFileFormat::readFileUTF8(const QString &fileName,
|
|||||||
{
|
{
|
||||||
QByteArray data;
|
QByteArray data;
|
||||||
try {
|
try {
|
||||||
Utils::FileReader reader;
|
FileReader reader;
|
||||||
if (!reader.fetch(fileName, errorString))
|
if (!reader.fetch(fileName, errorString))
|
||||||
return Utils::TextFileFormat::ReadIOError;
|
return TextFileFormat::ReadIOError;
|
||||||
data = reader.data();
|
data = reader.data();
|
||||||
} catch (const std::bad_alloc &) {
|
} catch (const std::bad_alloc &) {
|
||||||
*errorString = QCoreApplication::translate("Utils::TextFileFormat", "Out of memory.");
|
*errorString = QCoreApplication::translate("Utils::TextFileFormat", "Out of memory.");
|
||||||
return Utils::TextFileFormat::ReadMemoryAllocationError;
|
return TextFileFormat::ReadMemoryAllocationError;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::TextFileFormat format = Utils::TextFileFormat::detect(data);
|
TextFileFormat format = TextFileFormat::detect(data);
|
||||||
if (!format.codec)
|
if (!format.codec)
|
||||||
format.codec = defaultCodec ? defaultCodec : QTextCodec::codecForLocale();
|
format.codec = defaultCodec ? defaultCodec : QTextCodec::codecForLocale();
|
||||||
QString target;
|
QString target;
|
||||||
@@ -294,10 +294,10 @@ TextFileFormat::ReadResult TextFileFormat::readFileUTF8(const QString &fileName,
|
|||||||
if (format.hasUtf8Bom)
|
if (format.hasUtf8Bom)
|
||||||
data.remove(0, 3);
|
data.remove(0, 3);
|
||||||
*plainText = data;
|
*plainText = data;
|
||||||
return Utils::TextFileFormat::ReadSuccess;
|
return TextFileFormat::ReadSuccess;
|
||||||
}
|
}
|
||||||
*plainText = target.toUtf8();
|
*plainText = target.toUtf8();
|
||||||
return Utils::TextFileFormat::ReadSuccess;
|
return TextFileFormat::ReadSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -318,7 +318,7 @@ bool TextFileFormat::writeFile(const QString &fileName, QString plainText, QStri
|
|||||||
plainText.replace(QLatin1Char('\n'), QLatin1String("\r\n"));
|
plainText.replace(QLatin1Char('\n'), QLatin1String("\r\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FileSaver saver(fileName, fileMode);
|
FileSaver saver(fileName, fileMode);
|
||||||
if (!saver.hasError()) {
|
if (!saver.hasError()) {
|
||||||
if (hasUtf8Bom && codec->name() == "UTF-8")
|
if (hasUtf8Bom && codec->name() == "UTF-8")
|
||||||
saver.write("\xef\xbb\xbf", 3);
|
saver.write("\xef\xbb\xbf", 3);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ inline int screenNumber(const QPoint &pos, QWidget *w)
|
|||||||
|
|
||||||
inline QRect screenGeometry(const QPoint &pos, QWidget *w)
|
inline QRect screenGeometry(const QPoint &pos, QWidget *w)
|
||||||
{
|
{
|
||||||
if (Utils::HostOsInfo::isMacHost())
|
if (HostOsInfo::isMacHost())
|
||||||
return QApplication::desktop()->availableGeometry(screenNumber(pos, w));
|
return QApplication::desktop()->availableGeometry(screenNumber(pos, w));
|
||||||
return QApplication::desktop()->screenGeometry(screenNumber(pos, w));
|
return QApplication::desktop()->screenGeometry(screenNumber(pos, w));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ QTipLabel::QTipLabel(QWidget *parent) :
|
|||||||
|
|
||||||
QTipLabel::~QTipLabel()
|
QTipLabel::~QTipLabel()
|
||||||
{
|
{
|
||||||
Utils::TipContent *tmpTipContent = m_tipContent;
|
TipContent *tmpTipContent = m_tipContent;
|
||||||
m_tipContent = 0;
|
m_tipContent = 0;
|
||||||
delete tmpTipContent;
|
delete tmpTipContent;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ bool QTipLabel::isInteractive() const
|
|||||||
|
|
||||||
void QTipLabel::setContent(const TipContent &content)
|
void QTipLabel::setContent(const TipContent &content)
|
||||||
{
|
{
|
||||||
Utils::TipContent *tmpTipContent = m_tipContent;
|
TipContent *tmpTipContent = m_tipContent;
|
||||||
m_tipContent = content.clone();
|
m_tipContent = content.clone();
|
||||||
delete tmpTipContent;
|
delete tmpTipContent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,16 +53,16 @@ protected:
|
|||||||
public:
|
public:
|
||||||
virtual ~QTipLabel();
|
virtual ~QTipLabel();
|
||||||
|
|
||||||
void setContent(const Utils::TipContent &content);
|
void setContent(const TipContent &content);
|
||||||
const Utils::TipContent &content() const;
|
const TipContent &content() const;
|
||||||
|
|
||||||
virtual void configure(const QPoint &pos, QWidget *w) = 0;
|
virtual void configure(const QPoint &pos, QWidget *w) = 0;
|
||||||
virtual bool canHandleContentReplacement(const Utils::TipContent &content) const = 0;
|
virtual bool canHandleContentReplacement(const TipContent &content) const = 0;
|
||||||
|
|
||||||
bool isInteractive() const;
|
bool isInteractive() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Utils::TipContent *m_tipContent;
|
TipContent *m_tipContent;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ColorTip : public QTipLabel
|
class ColorTip : public QTipLabel
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ void ToolTip::placeTip(const QPoint &pos, QWidget *w)
|
|||||||
{
|
{
|
||||||
QRect screen = Internal::screenGeometry(pos, w);
|
QRect screen = Internal::screenGeometry(pos, w);
|
||||||
QPoint p = pos;
|
QPoint p = pos;
|
||||||
p += QPoint(2, Utils::HostOsInfo::isWindowsHost() ? 21 : 16);
|
p += QPoint(2, HostOsInfo::isWindowsHost() ? 21 : 16);
|
||||||
if (p.x() + m_tip->width() > screen.x() + screen.width())
|
if (p.x() + m_tip->width() > screen.x() + screen.width())
|
||||||
p.rx() -= 4 + m_tip->width();
|
p.rx() -= 4 + m_tip->width();
|
||||||
if (p.y() + m_tip->height() > screen.y() + screen.height())
|
if (p.y() + m_tip->height() > screen.y() + screen.height())
|
||||||
|
|||||||
@@ -30,13 +30,14 @@
|
|||||||
#include "wizard.h"
|
#include "wizard.h"
|
||||||
#include "hostosinfo.h"
|
#include "hostosinfo.h"
|
||||||
|
|
||||||
#include <QMap>
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
#include <QKeyEvent>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QVBoxLayout>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QStyle>
|
|
||||||
|
|
||||||
/*! \class Utils::Wizard
|
/*! \class Utils::Wizard
|
||||||
|
|
||||||
@@ -325,7 +326,7 @@ Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) :
|
|||||||
setOption(QWizard::NoBackButtonOnStartPage, true);
|
setOption(QWizard::NoBackButtonOnStartPage, true);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
|
||||||
if (Utils::HostOsInfo::isMacHost()) {
|
if (HostOsInfo::isMacHost()) {
|
||||||
setButtonLayout(QList<QWizard::WizardButton>()
|
setButtonLayout(QList<QWizard::WizardButton>()
|
||||||
<< QWizard::CancelButton
|
<< QWizard::CancelButton
|
||||||
<< QWizard::Stretch
|
<< QWizard::Stretch
|
||||||
@@ -376,6 +377,18 @@ bool Wizard::validateCurrentPage()
|
|||||||
return QWizard::validateCurrentPage();
|
return QWizard::validateCurrentPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Wizard::event(QEvent *event)
|
||||||
|
{
|
||||||
|
if (event->type() == QEvent::ShortcutOverride) {
|
||||||
|
auto ke = static_cast<QKeyEvent *>(event);
|
||||||
|
if (ke->key() == Qt::Key_Escape && !ke->modifiers()) {
|
||||||
|
ke->accept();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return QWizard::event(event);
|
||||||
|
}
|
||||||
|
|
||||||
void Wizard::_q_currentPageChanged(int pageId)
|
void Wizard::_q_currentPageChanged(int pageId)
|
||||||
{
|
{
|
||||||
Q_D(Wizard);
|
Q_D(Wizard);
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ signals:
|
|||||||
void nextClicked(); /* workaround for QWizard behavior where page->initialize is
|
void nextClicked(); /* workaround for QWizard behavior where page->initialize is
|
||||||
* called before currentIdChanged */
|
* called before currentIdChanged */
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool event(QEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void _q_currentPageChanged(int pageId);
|
void _q_currentPageChanged(int pageId);
|
||||||
void _q_pageAdded(int pageId);
|
void _q_pageAdded(int pageId);
|
||||||
|
|||||||
@@ -290,18 +290,10 @@ void AnalyzerManagerPrivate::delayedInit()
|
|||||||
// Populate Windows->Views menu with standard actions.
|
// Populate Windows->Views menu with standard actions.
|
||||||
Context analyzerContext(C_ANALYZEMODE);
|
Context analyzerContext(C_ANALYZEMODE);
|
||||||
ActionContainer *viewsMenu = Core::ActionManager::actionContainer(Id(M_WINDOW_VIEWS));
|
ActionContainer *viewsMenu = Core::ActionManager::actionContainer(Id(M_WINDOW_VIEWS));
|
||||||
Command *cmd = Core::ActionManager::registerAction(m_mainWindow->menuSeparator1(),
|
Command *cmd = Core::ActionManager::registerAction(m_mainWindow->menuSeparator(),
|
||||||
"Analyzer.Views.Separator1", analyzerContext);
|
"Analyzer.Views.Separator1", analyzerContext);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
viewsMenu->addAction(cmd, G_DEFAULT_THREE);
|
viewsMenu->addAction(cmd, G_DEFAULT_THREE);
|
||||||
cmd = Core::ActionManager::registerAction(m_mainWindow->toggleLockedAction(),
|
|
||||||
"Analyzer.Views.ToggleLocked", analyzerContext);
|
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
|
||||||
viewsMenu->addAction(cmd, G_DEFAULT_THREE);
|
|
||||||
cmd = Core::ActionManager::registerAction(m_mainWindow->menuSeparator2(),
|
|
||||||
"Analyzer.Views.Separator2", analyzerContext);
|
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
|
||||||
viewsMenu->addAction(cmd, G_DEFAULT_THREE);
|
|
||||||
cmd = Core::ActionManager::registerAction(m_mainWindow->resetLayoutAction(),
|
cmd = Core::ActionManager::registerAction(m_mainWindow->resetLayoutAction(),
|
||||||
"Analyzer.Views.ResetSimple", analyzerContext);
|
"Analyzer.Views.ResetSimple", analyzerContext);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
|
|||||||
@@ -620,8 +620,13 @@ QVector<AndroidDeviceInfo> AndroidConfig::androidVirtualDevices() const
|
|||||||
line = QLatin1String(avds[i]);
|
line = QLatin1String(avds[i]);
|
||||||
if (line.contains(QLatin1String("---------")))
|
if (line.contains(QLatin1String("---------")))
|
||||||
break;
|
break;
|
||||||
if (line.contains(QLatin1String("Target:")))
|
if (line.contains(QLatin1String("Target:"))) {
|
||||||
dev.sdk = line.mid(line.lastIndexOf(QLatin1Char(' '))).remove(QLatin1Char(')')).toInt();
|
QString tmp = line.mid(line.lastIndexOf(QLatin1Char(' '))).remove(QLatin1Char(')')).trimmed();
|
||||||
|
if (tmp == QLatin1String("L")) // HACK for android-L preview
|
||||||
|
dev.sdk = 20;
|
||||||
|
else
|
||||||
|
dev.sdk = tmp.toInt();
|
||||||
|
}
|
||||||
if (line.contains(QLatin1String("Tag/ABI:")))
|
if (line.contains(QLatin1String("Tag/ABI:")))
|
||||||
dev.cpuAbi = QStringList() << line.mid(line.lastIndexOf(QLatin1Char('/')) +1);
|
dev.cpuAbi = QStringList() << line.mid(line.lastIndexOf(QLatin1Char('/')) +1);
|
||||||
else if (line.contains(QLatin1String("ABI:")))
|
else if (line.contains(QLatin1String("ABI:")))
|
||||||
|
|||||||
@@ -793,8 +793,10 @@ QString AndroidManager::androidNameForApiLevel(int x)
|
|||||||
return QLatin1String("Android 4.3");
|
return QLatin1String("Android 4.3");
|
||||||
case 19:
|
case 19:
|
||||||
return QLatin1String("Android 4.4");
|
return QLatin1String("Android 4.4");
|
||||||
|
case 20:
|
||||||
|
return QLatin1String("Android L"); // prelimary name?
|
||||||
default:
|
default:
|
||||||
return tr("Unknown Android version.");
|
return tr("Unknown Android version. API Level: %1").arg(QString::number(x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,8 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Android;
|
using namespace Android;
|
||||||
using namespace Android::Internal;
|
using namespace Android::Internal;
|
||||||
@@ -180,7 +182,7 @@ void AndroidManifestEditorWidget::initializePage()
|
|||||||
|
|
||||||
|
|
||||||
m_versionCode = new QSpinBox(packageGroupBox);
|
m_versionCode = new QSpinBox(packageGroupBox);
|
||||||
m_versionCode->setMaximum(99);
|
m_versionCode->setMaximum(std::numeric_limits<int>::max());
|
||||||
m_versionCode->setValue(1);
|
m_versionCode->setValue(1);
|
||||||
m_versionCode->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
m_versionCode->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
formLayout->addRow(tr("Version code:"), m_versionCode);
|
formLayout->addRow(tr("Version code:"), m_versionCode);
|
||||||
|
|||||||
@@ -120,7 +120,8 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
|
|||||||
void AndroidPotentialKitWidget::openOptions()
|
void AndroidPotentialKitWidget::openOptions()
|
||||||
{
|
{
|
||||||
Core::ICore::showOptionsDialog(Constants::ANDROID_SETTINGS_CATEGORY,
|
Core::ICore::showOptionsDialog(Constants::ANDROID_SETTINGS_CATEGORY,
|
||||||
Constants::ANDROID_SETTINGS_ID);
|
Constants::ANDROID_SETTINGS_ID,
|
||||||
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidPotentialKitWidget::recheck()
|
void AndroidPotentialKitWidget::recheck()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/beautifier">
|
||||||
<file alias="categoryicon">images/beautifier.png</file>
|
<file>images/beautifier.png</file>
|
||||||
|
<file>images/beautifier@2x.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const char ACTION_ID[] = "Beautifier.Action";
|
|||||||
const char MENU_ID[] = "Beautifier.Menu";
|
const char MENU_ID[] = "Beautifier.Menu";
|
||||||
const char OPTION_CATEGORY[] = "II.Beautifier";
|
const char OPTION_CATEGORY[] = "II.Beautifier";
|
||||||
const char OPTION_TR_CATEGORY[] = QT_TRANSLATE_NOOP("Beautifier", "Beautifier");
|
const char OPTION_TR_CATEGORY[] = QT_TRANSLATE_NOOP("Beautifier", "Beautifier");
|
||||||
const char OPTION_CATEGORY_ICON[] = ":/categoryicon";
|
const char OPTION_CATEGORY_ICON[] = ":/beautifier/images/beautifier.png";
|
||||||
const char SETTINGS_GROUP[] = "Beautifier";
|
const char SETTINGS_GROUP[] = "Beautifier";
|
||||||
const char SETTINGS_DIRNAME[] = "beautifier";
|
const char SETTINGS_DIRNAME[] = "beautifier";
|
||||||
const char DOCUMENTATION_DIRNAME[] = "documentation";
|
const char DOCUMENTATION_DIRNAME[] = "documentation";
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.0 KiB |
BIN
src/plugins/beautifier/images/beautifier@2x.png
Normal file
BIN
src/plugins/beautifier/images/beautifier@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -292,7 +292,8 @@ bool NoKitPage::isComplete() const
|
|||||||
void NoKitPage::showOptions()
|
void NoKitPage::showOptions()
|
||||||
{
|
{
|
||||||
Core::ICore::showOptionsDialog(Core::Id(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
|
Core::ICore::showOptionsDialog(Core::Id(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
|
||||||
Core::Id(ProjectExplorer::Constants::KITS_SETTINGS_PAGE_ID), this);
|
Core::Id(ProjectExplorer::Constants::KITS_SETTINGS_PAGE_ID),
|
||||||
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
InSourceBuildPage::InSourceBuildPage(CMakeOpenProjectWizard *cmakeWizard)
|
InSourceBuildPage::InSourceBuildPage(CMakeOpenProjectWizard *cmakeWizard)
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ WizardEventLoop::WizardResult WizardEventLoop::execWizardPage(QWizard &wizard)
|
|||||||
connect(&wizard, SIGNAL(currentIdChanged(int)), eventLoop, SLOT(pageChanged(int)));
|
connect(&wizard, SIGNAL(currentIdChanged(int)), eventLoop, SLOT(pageChanged(int)));
|
||||||
connect(&wizard, SIGNAL(accepted()), eventLoop, SLOT(accepted()));
|
connect(&wizard, SIGNAL(accepted()), eventLoop, SLOT(accepted()));
|
||||||
connect(&wizard, SIGNAL(rejected()), eventLoop, SLOT(rejected()));
|
connect(&wizard, SIGNAL(rejected()), eventLoop, SLOT(rejected()));
|
||||||
wizard.setWindowFlags(wizard.windowFlags() | Qt::WindowStaysOnTopHint);
|
wizard.setWindowFlags(wizard.windowFlags());
|
||||||
wizard.show();
|
wizard.show();
|
||||||
}
|
}
|
||||||
const WizardResult result = eventLoop->execWizardPageI();
|
const WizardResult result = eventLoop->execWizardPageI();
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ NewDialog::NewDialog(QWidget *parent) :
|
|||||||
m_okButton(0)
|
m_okButton(0)
|
||||||
{
|
{
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags());
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
QPalette p = m_ui->frame->palette();
|
QPalette p = m_ui->frame->palette();
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#include <coreplugin/documentmanager.h>
|
#include <coreplugin/documentmanager.h>
|
||||||
#include <coreplugin/idocument.h>
|
#include <coreplugin/idocument.h>
|
||||||
|
|
||||||
|
#include <utils/algorithm.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -147,16 +148,6 @@ int DocumentModelPrivate::rowCount(const QModelIndex &parent) const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO remove
|
|
||||||
QList<IEditor *> DocumentModel::oneEditorForEachOpenedDocument()
|
|
||||||
{
|
|
||||||
QList<IEditor *> result;
|
|
||||||
QMapIterator<IDocument *, QList<IEditor *> > it(d->m_editors);
|
|
||||||
while (it.hasNext())
|
|
||||||
result << it.next().value().first();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DocumentModel::addEditor(IEditor *editor, bool *isNewDocument)
|
void DocumentModel::addEditor(IEditor *editor, bool *isNewDocument)
|
||||||
{
|
{
|
||||||
if (!editor)
|
if (!editor)
|
||||||
@@ -224,11 +215,6 @@ void DocumentModelPrivate::addEntry(DocumentModel::Entry *entry)
|
|||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
int DocumentModel::indexOfFilePath(const QString &filePath)
|
|
||||||
{
|
|
||||||
return d->indexOfFilePath(filePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
int DocumentModelPrivate::indexOfFilePath(const QString &filePath) const
|
int DocumentModelPrivate::indexOfFilePath(const QString &filePath) const
|
||||||
{
|
{
|
||||||
if (filePath.isEmpty())
|
if (filePath.isEmpty())
|
||||||
@@ -266,7 +252,7 @@ void DocumentModel::removeEditor(IEditor *editor, bool *lastOneForDocument)
|
|||||||
|
|
||||||
void DocumentModel::removeDocument(const QString &fileName)
|
void DocumentModel::removeDocument(const QString &fileName)
|
||||||
{
|
{
|
||||||
int index = indexOfFilePath(fileName);
|
int index = d->indexOfFilePath(fileName);
|
||||||
QTC_ASSERT(!d->m_entries.at(index)->document, return); // we wouldn't know what to do with the associated editors
|
QTC_ASSERT(!d->m_entries.at(index)->document, return); // we wouldn't know what to do with the associated editors
|
||||||
d->removeDocument(index);
|
d->removeDocument(index);
|
||||||
}
|
}
|
||||||
@@ -343,7 +329,7 @@ QList<IDocument *> DocumentModel::openedDocuments()
|
|||||||
|
|
||||||
IDocument *DocumentModel::documentForFilePath(const QString &filePath)
|
IDocument *DocumentModel::documentForFilePath(const QString &filePath)
|
||||||
{
|
{
|
||||||
int index = indexOfFilePath(filePath);
|
int index = d->indexOfFilePath(filePath);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
return 0;
|
return 0;
|
||||||
return d->m_entries.at(index)->document;
|
return d->m_entries.at(index)->document;
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ public:
|
|||||||
static int entryCount();
|
static int entryCount();
|
||||||
static QList<Entry *> entries();
|
static QList<Entry *> entries();
|
||||||
static int indexOfDocument(IDocument *document);
|
static int indexOfDocument(IDocument *document);
|
||||||
static int indexOfFilePath(const QString &filePath);
|
|
||||||
static Entry *entryForDocument(IDocument *document);
|
static Entry *entryForDocument(IDocument *document);
|
||||||
static QList<IDocument *> openedDocuments();
|
static QList<IDocument *> openedDocuments();
|
||||||
|
|
||||||
@@ -78,7 +77,6 @@ public:
|
|||||||
static QList<IEditor *> editorsForFilePath(const QString &filePath);
|
static QList<IEditor *> editorsForFilePath(const QString &filePath);
|
||||||
static QList<IEditor *> editorsForDocument(IDocument *document);
|
static QList<IEditor *> editorsForDocument(IDocument *document);
|
||||||
static QList<IEditor *> editorsForDocuments(const QList<IDocument *> &entries);
|
static QList<IEditor *> editorsForDocuments(const QList<IDocument *> &entries);
|
||||||
static QList<IEditor *> oneEditorForEachOpenedDocument();
|
|
||||||
static QList<IEditor *> editorsForOpenedDocuments();
|
static QList<IEditor *> editorsForOpenedDocuments();
|
||||||
|
|
||||||
// editor manager related functions, nobody else should call it
|
// editor manager related functions, nobody else should call it
|
||||||
|
|||||||
@@ -830,7 +830,7 @@ void EditorManager::addNativeDirAndOpenWithActions(QMenu *contextMenu, DocumentM
|
|||||||
contextMenu->addAction(d->m_openGraphicalShellAction);
|
contextMenu->addAction(d->m_openGraphicalShellAction);
|
||||||
contextMenu->addAction(d->m_openTerminalAction);
|
contextMenu->addAction(d->m_openTerminalAction);
|
||||||
contextMenu->addAction(d->m_findInDirectoryAction);
|
contextMenu->addAction(d->m_findInDirectoryAction);
|
||||||
QMenu *openWith = contextMenu->addMenu(tr("Open with"));
|
QMenu *openWith = contextMenu->addMenu(tr("Open With"));
|
||||||
connect(openWith, SIGNAL(triggered(QAction*)),
|
connect(openWith, SIGNAL(triggered(QAction*)),
|
||||||
DocumentManager::instance(), SLOT(executeOpenWithMenuAction(QAction*)));
|
DocumentManager::instance(), SLOT(executeOpenWithMenuAction(QAction*)));
|
||||||
openWith->setEnabled(enabled);
|
openWith->setEnabled(enabled);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
\mainclass
|
\mainclass
|
||||||
|
|
||||||
\brief The IExternalEditor class enables registering an external
|
\brief The IExternalEditor class enables registering an external
|
||||||
editor in the \gui{Open with} dialog.
|
editor in the \gui{Open With} dialog.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -69,8 +69,11 @@ static void showGraphicalShellError(QWidget *parent, const QString &app, const Q
|
|||||||
QAbstractButton *settingsButton = mbox.addButton(Core::ICore::msgShowOptionsDialog(),
|
QAbstractButton *settingsButton = mbox.addButton(Core::ICore::msgShowOptionsDialog(),
|
||||||
QMessageBox::ActionRole);
|
QMessageBox::ActionRole);
|
||||||
mbox.exec();
|
mbox.exec();
|
||||||
if (mbox.clickedButton() == settingsButton)
|
if (mbox.clickedButton() == settingsButton) {
|
||||||
ICore::showOptionsDialog(Constants::SETTINGS_CATEGORY_CORE, Constants::SETTINGS_ID_ENVIRONMENT);
|
ICore::showOptionsDialog(Constants::SETTINGS_CATEGORY_CORE,
|
||||||
|
Constants::SETTINGS_ID_ENVIRONMENT,
|
||||||
|
parent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileUtils::showInGraphicalShell(QWidget *parent, const QString &pathIn)
|
void FileUtils::showInGraphicalShell(QWidget *parent, const QString &pathIn)
|
||||||
|
|||||||
@@ -36,15 +36,17 @@
|
|||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/icontext.h>
|
#include <coreplugin/icontext.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/styledbar.h>
|
||||||
|
|
||||||
#include <QSettings>
|
#include <QAction>
|
||||||
|
#include <QComboBox>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include <QAction>
|
#include <QLabel>
|
||||||
#include <QToolButton>
|
|
||||||
#include <QComboBox>
|
|
||||||
#include <QScrollArea>
|
#include <QScrollArea>
|
||||||
|
#include <QSettings>
|
||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
|
#include <QToolButton>
|
||||||
|
|
||||||
static const char SETTINGSKEYSECTIONNAME[] = "SearchResults";
|
static const char SETTINGSKEYSECTIONNAME[] = "SearchResults";
|
||||||
static const char SETTINGSKEYEXPANDRESULTS[] = "ExpandResults";
|
static const char SETTINGSKEYEXPANDRESULTS[] = "ExpandResults";
|
||||||
@@ -90,6 +92,8 @@ namespace Internal {
|
|||||||
QAction *m_expandCollapseAction;
|
QAction *m_expandCollapseAction;
|
||||||
static const bool m_initiallyExpand = false;
|
static const bool m_initiallyExpand = false;
|
||||||
QWidget *m_spacer;
|
QWidget *m_spacer;
|
||||||
|
QLabel *m_historyLabel;
|
||||||
|
QWidget *m_spacer2;
|
||||||
QComboBox *m_recentSearchesBox;
|
QComboBox *m_recentSearchesBox;
|
||||||
QStackedWidget *m_widget;
|
QStackedWidget *m_widget;
|
||||||
QList<SearchResult *> m_searchResults;
|
QList<SearchResult *> m_searchResults;
|
||||||
@@ -276,7 +280,11 @@ SearchResultWindow::SearchResultWindow(QWidget *newSearchPanel)
|
|||||||
|
|
||||||
d->m_spacer = new QWidget;
|
d->m_spacer = new QWidget;
|
||||||
d->m_spacer->setMinimumWidth(30);
|
d->m_spacer->setMinimumWidth(30);
|
||||||
|
d->m_historyLabel = new QLabel(tr("History:"));
|
||||||
|
d->m_spacer2 = new QWidget;
|
||||||
|
d->m_spacer2->setMinimumWidth(5);
|
||||||
d->m_recentSearchesBox = new QComboBox;
|
d->m_recentSearchesBox = new QComboBox;
|
||||||
|
d->m_recentSearchesBox->setProperty("drawleftborder", true);
|
||||||
d->m_recentSearchesBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
d->m_recentSearchesBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||||
d->m_recentSearchesBox->addItem(tr("New Search"));
|
d->m_recentSearchesBox->addItem(tr("New Search"));
|
||||||
connect(d->m_recentSearchesBox, SIGNAL(activated(int)), d, SLOT(setCurrentIndex(int)));
|
connect(d->m_recentSearchesBox, SIGNAL(activated(int)), d, SLOT(setCurrentIndex(int)));
|
||||||
@@ -347,7 +355,8 @@ QWidget *SearchResultWindow::outputWidget(QWidget *)
|
|||||||
*/
|
*/
|
||||||
QList<QWidget*> SearchResultWindow::toolBarWidgets() const
|
QList<QWidget*> SearchResultWindow::toolBarWidgets() const
|
||||||
{
|
{
|
||||||
return QList<QWidget*>() << d->m_expandCollapseButton << d->m_spacer << d->m_recentSearchesBox;
|
return QList<QWidget*>() << d->m_expandCollapseButton << d->m_spacer
|
||||||
|
<< d->m_historyLabel << d->m_spacer2 << d->m_recentSearchesBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -833,7 +833,7 @@ bool MainWindow::showOptionsDialog(Id category, Id page, QWidget *parent)
|
|||||||
{
|
{
|
||||||
emit m_coreImpl->optionsDialogRequested();
|
emit m_coreImpl->optionsDialogRequested();
|
||||||
if (!parent)
|
if (!parent)
|
||||||
parent = this;
|
parent = ICore::dialogParent();
|
||||||
SettingsDialog *dialog = SettingsDialog::getSettingsDialog(parent, category, page);
|
SettingsDialog *dialog = SettingsDialog::getSettingsDialog(parent, category, page);
|
||||||
return dialog->execDialog();
|
return dialog->execDialog();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -923,17 +923,25 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti
|
|||||||
bool isEmpty = cb->currentText.isEmpty() && cb->currentIcon.isNull();
|
bool isEmpty = cb->currentText.isEmpty() && cb->currentIcon.isNull();
|
||||||
bool reverse = option->direction == Qt::RightToLeft;
|
bool reverse = option->direction == Qt::RightToLeft;
|
||||||
bool drawborder = !(widget && widget->property("hideborder").toBool());
|
bool drawborder = !(widget && widget->property("hideborder").toBool());
|
||||||
|
bool drawleftborder = (widget && widget->property("drawleftborder").toBool());
|
||||||
bool alignarrow = !(widget && widget->property("alignarrow").toBool());
|
bool alignarrow = !(widget && widget->property("alignarrow").toBool());
|
||||||
|
|
||||||
if (drawborder)
|
if (drawborder) {
|
||||||
drawButtonSeparator(painter, rect, reverse);
|
drawButtonSeparator(painter, rect, reverse);
|
||||||
|
if (drawleftborder)
|
||||||
|
drawButtonSeparator(painter, rect.adjusted(0, 0, -rect.width() + 2, 0), reverse);
|
||||||
|
}
|
||||||
|
|
||||||
QStyleOption toolbutton = *option;
|
QStyleOption toolbutton = *option;
|
||||||
if (isEmpty)
|
if (isEmpty)
|
||||||
toolbutton.state &= ~(State_Enabled | State_Sunken);
|
toolbutton.state &= ~(State_Enabled | State_Sunken);
|
||||||
painter->save();
|
painter->save();
|
||||||
if (drawborder)
|
if (drawborder) {
|
||||||
painter->setClipRect(toolbutton.rect.adjusted(0, 0, -2, 0));
|
int leftClipAdjust = 0;
|
||||||
|
if (drawleftborder)
|
||||||
|
leftClipAdjust = 2;
|
||||||
|
painter->setClipRect(toolbutton.rect.adjusted(leftClipAdjust, 0, -2, 0));
|
||||||
|
}
|
||||||
drawPrimitive(PE_PanelButtonTool, &toolbutton, painter, widget);
|
drawPrimitive(PE_PanelButtonTool, &toolbutton, painter, widget);
|
||||||
painter->restore();
|
painter->restore();
|
||||||
// Draw arrow
|
// Draw arrow
|
||||||
|
|||||||
@@ -169,9 +169,11 @@ bool Protocol::showConfigurationError(const Protocol *p,
|
|||||||
settingsButton = mb.addButton(Core::ICore::msgShowOptionsDialog(), QMessageBox::AcceptRole);
|
settingsButton = mb.addButton(Core::ICore::msgShowOptionsDialog(), QMessageBox::AcceptRole);
|
||||||
mb.exec();
|
mb.exec();
|
||||||
bool rc = false;
|
bool rc = false;
|
||||||
if (mb.clickedButton() == settingsButton)
|
if (mb.clickedButton() == settingsButton) {
|
||||||
rc = Core::ICore::showOptionsDialog(p->settingsPage()->category(),
|
rc = Core::ICore::showOptionsDialog(p->settingsPage()->category(),
|
||||||
p->settingsPage()->id(), parent);
|
p->settingsPage()->id(),
|
||||||
|
parent);
|
||||||
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ Class *isMemberFunction(const LookupContext &context, Function *function)
|
|||||||
|
|
||||||
const Name *functionName = function->name();
|
const Name *functionName = function->name();
|
||||||
if (!functionName)
|
if (!functionName)
|
||||||
return 0; // anonymous function names are not valid c++
|
return 0;
|
||||||
|
|
||||||
if (!functionName->isQualifiedNameId())
|
if (!functionName->isQualifiedNameId())
|
||||||
return 0; // trying to add a declaration for a global function
|
return 0; // trying to add a declaration for a global function
|
||||||
@@ -225,7 +225,7 @@ Namespace *isNamespaceFunction(const LookupContext &context, Function *function)
|
|||||||
|
|
||||||
const Name *functionName = function->name();
|
const Name *functionName = function->name();
|
||||||
if (!functionName)
|
if (!functionName)
|
||||||
return 0; // anonymous function names are not valid c++
|
return 0;
|
||||||
|
|
||||||
// global namespace
|
// global namespace
|
||||||
if (!functionName->isQualifiedNameId()) {
|
if (!functionName->isQualifiedNameId()) {
|
||||||
@@ -4148,7 +4148,7 @@ QString definitionSignature(const CppQuickFixAssistInterface *assist,
|
|||||||
oo.showReturnTypes = true;
|
oo.showReturnTypes = true;
|
||||||
oo.showArgumentNames = true;
|
oo.showArgumentNames = true;
|
||||||
const Name *name = func->name();
|
const Name *name = func->name();
|
||||||
if (nameIncludesOperatorName(name)) {
|
if (name && nameIncludesOperatorName(name)) {
|
||||||
CoreDeclaratorAST *coreDeclarator = functionDefinitionAST->declarator->core_declarator;
|
CoreDeclaratorAST *coreDeclarator = functionDefinitionAST->declarator->core_declarator;
|
||||||
const QString operatorNameText = baseFile->textOf(coreDeclarator);
|
const QString operatorNameText = baseFile->textOf(coreDeclarator);
|
||||||
oo.includeWhiteSpaceInOperatorName = operatorNameText.contains(QLatin1Char(' '));
|
oo.includeWhiteSpaceInOperatorName = operatorNameText.contains(QLatin1Char(' '));
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ void SymbolFinder::findMatchingDeclaration(const LookupContext &context,
|
|||||||
|
|
||||||
const Name *functionName = functionType->name();
|
const Name *functionName = functionType->name();
|
||||||
if (!functionName)
|
if (!functionName)
|
||||||
return; // anonymous function names are not valid c++
|
return;
|
||||||
|
|
||||||
ClassOrNamespace *binding = 0;
|
ClassOrNamespace *binding = 0;
|
||||||
const QualifiedNameId *qName = functionName->asQualifiedNameId();
|
const QualifiedNameId *qName = functionName->asQualifiedNameId();
|
||||||
|
|||||||
@@ -729,15 +729,6 @@ void BreakTreeView::mouseDoubleClickEvent(QMouseEvent *ev)
|
|||||||
BaseTreeView::mouseDoubleClickEvent(ev);
|
BaseTreeView::mouseDoubleClickEvent(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BreakTreeView::setModel(QAbstractItemModel *model)
|
|
||||||
{
|
|
||||||
BaseTreeView::setModel(model);
|
|
||||||
resizeColumnToContents(0); // Number
|
|
||||||
resizeColumnToContents(3); // Line
|
|
||||||
resizeColumnToContents(6); // Ignore count
|
|
||||||
connect(model, SIGNAL(layoutChanged()), this, SLOT(expandAll()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void BreakTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
void BreakTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
||||||
{
|
{
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
@@ -783,9 +774,6 @@ void BreakTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
deleteByFileAction->setEnabled(false);
|
deleteByFileAction->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *adjustColumnAction =
|
|
||||||
new QAction(tr("Adjust Column Widths to Contents"), &menu);
|
|
||||||
|
|
||||||
QAction *editBreakpointAction =
|
QAction *editBreakpointAction =
|
||||||
new QAction(tr("Edit Breakpoint..."), &menu);
|
new QAction(tr("Edit Breakpoint..."), &menu);
|
||||||
editBreakpointAction->setEnabled(!selectedIds.isEmpty());
|
editBreakpointAction->setEnabled(!selectedIds.isEmpty());
|
||||||
@@ -842,8 +830,6 @@ void BreakTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
deleteAllBreakpoints();
|
deleteAllBreakpoints();
|
||||||
else if (act == deleteByFileAction)
|
else if (act == deleteByFileAction)
|
||||||
deleteBreakpoints(breakpointsInFile);
|
deleteBreakpoints(breakpointsInFile);
|
||||||
else if (act == adjustColumnAction)
|
|
||||||
resizeColumns();
|
|
||||||
else if (act == editBreakpointAction)
|
else if (act == editBreakpointAction)
|
||||||
editBreakpoints(selectedIds);
|
editBreakpoints(selectedIds);
|
||||||
else if (act == associateBreakpointAction)
|
else if (act == associateBreakpointAction)
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ public:
|
|||||||
BreakTreeView();
|
BreakTreeView();
|
||||||
|
|
||||||
static void editBreakpoint(BreakpointModelId id, QWidget *parent);
|
static void editBreakpoint(BreakpointModelId id, QWidget *parent);
|
||||||
void setModel(QAbstractItemModel *model);
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void showAddressColumn(bool on);
|
void showAddressColumn(bool on);
|
||||||
|
|||||||
@@ -585,7 +585,7 @@ DebuggerSettings::DebuggerSettings()
|
|||||||
|
|
||||||
item = new SavedAction(this);
|
item = new SavedAction(this);
|
||||||
item->setSettingsKey(debugModeGroup, QLatin1String("DisplayStringLimit"));
|
item->setSettingsKey(debugModeGroup, QLatin1String("DisplayStringLimit"));
|
||||||
item->setToolTip(tr("The maximal length of string entries in the "
|
item->setToolTip(tr("The maximum length of string entries in the "
|
||||||
"Locals and Expressions pane. Longer than that are cut off "
|
"Locals and Expressions pane. Longer than that are cut off "
|
||||||
"and displayed with an ellipsis attached."));
|
"and displayed with an ellipsis attached."));
|
||||||
item->setDefaultValue(100);
|
item->setDefaultValue(100);
|
||||||
@@ -593,7 +593,7 @@ DebuggerSettings::DebuggerSettings()
|
|||||||
|
|
||||||
item = new SavedAction(this);
|
item = new SavedAction(this);
|
||||||
item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStringLength"));
|
item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStringLength"));
|
||||||
item->setToolTip(tr("The maximal length for strings in separated windows. "
|
item->setToolTip(tr("The maximum length for strings in separated windows. "
|
||||||
"Longer strings are cut off and displayed with an ellipsis attached."));
|
"Longer strings are cut off and displayed with an ellipsis attached."));
|
||||||
item->setDefaultValue(10000);
|
item->setDefaultValue(10000);
|
||||||
insertItem(MaximalStringLength, item);
|
insertItem(MaximalStringLength, item);
|
||||||
|
|||||||
@@ -136,7 +136,8 @@ QWidget *DebuggerKitConfigWidget::mainWidget() const
|
|||||||
void DebuggerKitConfigWidget::manageDebuggers()
|
void DebuggerKitConfigWidget::manageDebuggers()
|
||||||
{
|
{
|
||||||
Core::ICore::showOptionsDialog(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
|
Core::ICore::showOptionsDialog(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
|
||||||
ProjectExplorer::Constants::DEBUGGER_SETTINGS_PAGE_ID);
|
ProjectExplorer::Constants::DEBUGGER_SETTINGS_PAGE_ID,
|
||||||
|
buttonWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerKitConfigWidget::currentDebuggerChanged(int)
|
void DebuggerKitConfigWidget::currentDebuggerChanged(int)
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ public:
|
|||||||
// Debuggable languages are registered with this function.
|
// Debuggable languages are registered with this function.
|
||||||
void addLanguage(DebuggerLanguage language, const Core::Context &context);
|
void addLanguage(DebuggerLanguage language, const Core::Context &context);
|
||||||
|
|
||||||
|
QDockWidget *dockWidget(const QString &objectName) const
|
||||||
|
{ return q->findChild<QDockWidget *>(objectName); }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void resetDebuggerLayout();
|
void resetDebuggerLayout();
|
||||||
@@ -313,16 +315,8 @@ void DebuggerMainWindowPrivate::createViewsMenuItems()
|
|||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
||||||
|
|
||||||
cmd = Core::ActionManager::registerAction(q->menuSeparator1(),
|
cmd = Core::ActionManager::registerAction(q->menuSeparator(),
|
||||||
"Debugger.Views.Separator1", debugcontext);
|
"Debugger.Views.Separator", debugcontext);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
|
||||||
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
|
||||||
cmd = Core::ActionManager::registerAction(q->toggleLockedAction(),
|
|
||||||
"Debugger.Views.ToggleLocked", debugcontext);
|
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
|
||||||
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
|
||||||
cmd = Core::ActionManager::registerAction(q->menuSeparator2(),
|
|
||||||
"Debugger.Views.Separator2", debugcontext);
|
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
m_viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
||||||
cmd = Core::ActionManager::registerAction(q->resetLayoutAction(),
|
cmd = Core::ActionManager::registerAction(q->resetLayoutAction(),
|
||||||
@@ -397,17 +391,6 @@ void DebuggerMainWindow::setToolBar(DebuggerLanguage language, QWidget *widget)
|
|||||||
d->m_debugToolBarLayout->insertWidget(-1, widget, 10);
|
d->m_debugToolBarLayout->insertWidget(-1, widget, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
QDockWidget *DebuggerMainWindow::dockWidget(const QString &objectName) const
|
|
||||||
{
|
|
||||||
return findChild<QDockWidget *>(objectName);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DebuggerMainWindow::isDockVisible(const QString &objectName) const
|
|
||||||
{
|
|
||||||
QDockWidget *dock = dockWidget(objectName);
|
|
||||||
return dock && dock->toggleViewAction()->isChecked();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Keep track of dock widgets so they can be shown/hidden for different languages
|
Keep track of dock widgets so they can be shown/hidden for different languages
|
||||||
*/
|
*/
|
||||||
@@ -464,8 +447,6 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
|
|||||||
setDockNestingEnabled(true);
|
setDockNestingEnabled(true);
|
||||||
connect(this, SIGNAL(resetLayout()),
|
connect(this, SIGNAL(resetLayout()),
|
||||||
d, SLOT(resetDebuggerLayout()));
|
d, SLOT(resetDebuggerLayout()));
|
||||||
connect(toggleLockedAction(), SIGNAL(triggered()),
|
|
||||||
d, SLOT(updateDockWidgetSettings()));
|
|
||||||
|
|
||||||
QBoxLayout *editorHolderLayout = new QVBoxLayout;
|
QBoxLayout *editorHolderLayout = new QVBoxLayout;
|
||||||
editorHolderLayout->setMargin(0);
|
editorHolderLayout->setMargin(0);
|
||||||
@@ -659,16 +640,16 @@ void DebuggerMainWindowPrivate::setSimpleDockWidgetArrangement()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QDockWidget *toolBarDock = q->toolBarDockWidget();
|
QDockWidget *toolBarDock = q->toolBarDockWidget();
|
||||||
QDockWidget *breakDock = q->dockWidget(QLatin1String(DOCKWIDGET_BREAK));
|
QDockWidget *breakDock = dockWidget(QLatin1String(DOCKWIDGET_BREAK));
|
||||||
QDockWidget *stackDock = q->dockWidget(QLatin1String(DOCKWIDGET_STACK));
|
QDockWidget *stackDock = dockWidget(QLatin1String(DOCKWIDGET_STACK));
|
||||||
QDockWidget *watchDock = q->dockWidget(QLatin1String(DOCKWIDGET_WATCHERS));
|
QDockWidget *watchDock = dockWidget(QLatin1String(DOCKWIDGET_WATCHERS));
|
||||||
QDockWidget *snapshotsDock = q->dockWidget(QLatin1String(DOCKWIDGET_SNAPSHOTS));
|
QDockWidget *snapshotsDock = dockWidget(QLatin1String(DOCKWIDGET_SNAPSHOTS));
|
||||||
QDockWidget *threadsDock = q->dockWidget(QLatin1String(DOCKWIDGET_THREADS));
|
QDockWidget *threadsDock = dockWidget(QLatin1String(DOCKWIDGET_THREADS));
|
||||||
QDockWidget *outputDock = q->dockWidget(QLatin1String(DOCKWIDGET_OUTPUT));
|
QDockWidget *outputDock = dockWidget(QLatin1String(DOCKWIDGET_OUTPUT));
|
||||||
QDockWidget *qmlInspectorDock = q->dockWidget(QLatin1String(DOCKWIDGET_QML_INSPECTOR));
|
QDockWidget *qmlInspectorDock = dockWidget(QLatin1String(DOCKWIDGET_QML_INSPECTOR));
|
||||||
QDockWidget *modulesDock = q->dockWidget(QLatin1String(DOCKWIDGET_MODULES));
|
QDockWidget *modulesDock = dockWidget(QLatin1String(DOCKWIDGET_MODULES));
|
||||||
QDockWidget *registerDock = q->dockWidget(QLatin1String(DOCKWIDGET_REGISTER));
|
QDockWidget *registerDock = dockWidget(QLatin1String(DOCKWIDGET_REGISTER));
|
||||||
QDockWidget *sourceFilesDock = q->dockWidget(QLatin1String(DOCKWIDGET_SOURCE_FILES));
|
QDockWidget *sourceFilesDock = dockWidget(QLatin1String(DOCKWIDGET_SOURCE_FILES));
|
||||||
|
|
||||||
QTC_ASSERT(breakDock, return);
|
QTC_ASSERT(breakDock, return);
|
||||||
QTC_ASSERT(stackDock, return);
|
QTC_ASSERT(stackDock, return);
|
||||||
|
|||||||
@@ -80,8 +80,6 @@ public:
|
|||||||
void initialize();
|
void initialize();
|
||||||
|
|
||||||
void onModeChanged(Core::IMode *mode);
|
void onModeChanged(Core::IMode *mode);
|
||||||
QDockWidget *dockWidget(const QString &objectName) const;
|
|
||||||
bool isDockVisible(const QString &objectName) const;
|
|
||||||
|
|
||||||
// Dockwidgets are registered to the main window.
|
// Dockwidgets are registered to the main window.
|
||||||
QDockWidget *createDockWidget(const DebuggerLanguage &language, QWidget *widget);
|
QDockWidget *createDockWidget(const DebuggerLanguage &language, QWidget *widget);
|
||||||
|
|||||||
@@ -909,8 +909,12 @@ public slots:
|
|||||||
const CPlusPlus::Snapshot &cppCodeModelSnapshot() const;
|
const CPlusPlus::Snapshot &cppCodeModelSnapshot() const;
|
||||||
|
|
||||||
DebuggerMainWindow *mainWindow() const { return m_mainWindow; }
|
DebuggerMainWindow *mainWindow() const { return m_mainWindow; }
|
||||||
|
|
||||||
bool isDockVisible(const QString &objectName) const
|
bool isDockVisible(const QString &objectName) const
|
||||||
{ return mainWindow()->isDockVisible(objectName); }
|
{
|
||||||
|
QDockWidget *dock = mainWindow()->findChild<QDockWidget *>(objectName);
|
||||||
|
return dock && dock->toggleViewAction()->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
bool hasSnapshots() const { return m_snapshotHandler->size(); }
|
bool hasSnapshots() const { return m_snapshotHandler->size(); }
|
||||||
void createNewDock(QWidget *widget);
|
void createNewDock(QWidget *widget);
|
||||||
@@ -2626,7 +2630,6 @@ void DebuggerPluginPrivate::createNewDock(QWidget *widget)
|
|||||||
{
|
{
|
||||||
QDockWidget *dockWidget =
|
QDockWidget *dockWidget =
|
||||||
m_mainWindow->createDockWidget(CppLanguage, widget);
|
m_mainWindow->createDockWidget(CppLanguage, widget);
|
||||||
dockWidget->setWindowTitle(widget->windowTitle());
|
|
||||||
dockWidget->setFeatures(QDockWidget::DockWidgetClosable);
|
dockWidget->setFeatures(QDockWidget::DockWidgetClosable);
|
||||||
dockWidget->show();
|
dockWidget->show();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,12 +321,15 @@ bool AttachCoreDialog::useLocalCoreFile() const
|
|||||||
|
|
||||||
void AttachCoreDialog::coreFileChanged(const QString &core)
|
void AttachCoreDialog::coreFileChanged(const QString &core)
|
||||||
{
|
{
|
||||||
|
if (!Utils::HostOsInfo::isWindowsHost()) {
|
||||||
Kit *k = d->kitChooser->currentKit();
|
Kit *k = d->kitChooser->currentKit();
|
||||||
QTC_ASSERT(k, return);
|
QTC_ASSERT(k, return);
|
||||||
FileName cmd = DebuggerKitInformation::debuggerCommand(k);
|
FileName cmd = DebuggerKitInformation::debuggerCommand(k);
|
||||||
bool isCore = false;
|
bool isCore = false;
|
||||||
QString exe = readExecutableNameFromCore(cmd.toString(), core, &isCore);
|
const QString exe = readExecutableNameFromCore(cmd.toString(), core, &isCore);
|
||||||
|
if (!exe.isEmpty())
|
||||||
d->localExecFileName->setFileName(FileName::fromString(exe));
|
d->localExecFileName->setFileName(FileName::fromString(exe));
|
||||||
|
}
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,14 +230,8 @@ void FormEditorW::setupViewActions()
|
|||||||
|
|
||||||
addDockViewAction(viewMenu, ActionEditorSubWindow, m_contexts,
|
addDockViewAction(viewMenu, ActionEditorSubWindow, m_contexts,
|
||||||
tr("Action Editor"), "FormEditor.ActionEditor");
|
tr("Action Editor"), "FormEditor.ActionEditor");
|
||||||
// Lock/Reset
|
// Reset
|
||||||
Command *cmd = addToolAction(m_editorWidget->menuSeparator1(), m_contexts, "FormEditor.SeparatorLock", viewMenu);
|
Command *cmd = addToolAction(m_editorWidget->menuSeparator(), m_contexts, "FormEditor.SeparatorReset", viewMenu);
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
|
||||||
|
|
||||||
cmd = addToolAction(m_editorWidget->toggleLockedAction(), m_contexts, "FormEditor.Locked", viewMenu);
|
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
|
||||||
|
|
||||||
cmd = addToolAction(m_editorWidget->menuSeparator2(), m_contexts, "FormEditor.SeparatorReset", viewMenu);
|
|
||||||
cmd->setAttribute(Command::CA_Hide);
|
cmd->setAttribute(Command::CA_Hide);
|
||||||
|
|
||||||
cmd = addToolAction(m_editorWidget->resetLayoutAction(), m_contexts, "FormEditor.ResetToDefaultLayout", viewMenu);
|
cmd = addToolAction(m_editorWidget->resetLayoutAction(), m_contexts, "FormEditor.ResetToDefaultLayout", viewMenu);
|
||||||
|
|||||||
@@ -44,14 +44,12 @@ struct CloneWizardPagePrivate {
|
|||||||
|
|
||||||
const QString mainLinePostfix;
|
const QString mainLinePostfix;
|
||||||
const QString gitPostFix;
|
const QString gitPostFix;
|
||||||
const QString protocolDelimiter;
|
|
||||||
QCheckBox *recursiveCheckBox;
|
QCheckBox *recursiveCheckBox;
|
||||||
};
|
};
|
||||||
|
|
||||||
CloneWizardPagePrivate::CloneWizardPagePrivate() :
|
CloneWizardPagePrivate::CloneWizardPagePrivate() :
|
||||||
mainLinePostfix(QLatin1String("/mainline.git")),
|
mainLinePostfix(QLatin1String("/mainline.git")),
|
||||||
gitPostFix(QLatin1String(".git")),
|
gitPostFix(QLatin1String(".git")),
|
||||||
protocolDelimiter(QLatin1String("://")),
|
|
||||||
recursiveCheckBox(0)
|
recursiveCheckBox(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -83,33 +81,21 @@ CloneWizardPage::~CloneWizardPage()
|
|||||||
|
|
||||||
QString CloneWizardPage::directoryFromRepository(const QString &urlIn) const
|
QString CloneWizardPage::directoryFromRepository(const QString &urlIn) const
|
||||||
{
|
{
|
||||||
/* Try to figure out a good directory name from something like:
|
|
||||||
* 'user@host:qt/qt.git', 'http://host/qt/qt.git' 'local repo'
|
|
||||||
* ------> 'qt' . */
|
|
||||||
const QChar slash = QLatin1Char('/');
|
const QChar slash = QLatin1Char('/');
|
||||||
QString url = urlIn.trimmed().replace(QLatin1Char('\\'), slash);
|
QString url = urlIn.trimmed().replace(QLatin1Char('\\'), slash);
|
||||||
|
|
||||||
// remove host
|
|
||||||
const int protocolDelimiterPos = url.indexOf(d->protocolDelimiter); // "://"
|
|
||||||
const int startRepoSearchPos = protocolDelimiterPos == -1 ? 0 : protocolDelimiterPos + d->protocolDelimiter.size();
|
|
||||||
int repoPos = url.indexOf(QLatin1Char(':'), startRepoSearchPos);
|
|
||||||
if (repoPos == -1)
|
|
||||||
repoPos = url.indexOf(slash, startRepoSearchPos);
|
|
||||||
if (repoPos != -1)
|
|
||||||
url.remove(0, repoPos + 1);
|
|
||||||
// Remove postfixes
|
// Remove postfixes
|
||||||
if (url.endsWith(d->mainLinePostfix)) {
|
if (url.endsWith(d->mainLinePostfix))
|
||||||
url.truncate(url.size() - d->mainLinePostfix.size());
|
url.truncate(url.size() - d->mainLinePostfix.size());
|
||||||
} else {
|
else if (url.endsWith(d->gitPostFix))
|
||||||
if (url.endsWith(d->gitPostFix))
|
|
||||||
url.truncate(url.size() - d->gitPostFix.size());
|
url.truncate(url.size() - d->gitPostFix.size());
|
||||||
}
|
|
||||||
// Check for equal parts, something like "qt/qt" -> "qt"
|
// extract repository name (last part of path)
|
||||||
const int slashPos = url.indexOf(slash);
|
int startOfRepoName = url.lastIndexOf(slash);
|
||||||
if (slashPos != -1 && slashPos == (url.size() - 1) / 2) {
|
if (startOfRepoName == -1)
|
||||||
if (url.leftRef(slashPos) == url.rightRef(slashPos))
|
startOfRepoName = url.lastIndexOf(QLatin1Char(':'));
|
||||||
url.truncate(slashPos);
|
url.remove(0, startOfRepoName);
|
||||||
}
|
|
||||||
// fix invalid characters
|
// fix invalid characters
|
||||||
const QChar dash = QLatin1Char('-');
|
const QChar dash = QLatin1Char('-');
|
||||||
url.replace(QRegExp(QLatin1String("[^0-9a-zA-Z_.-]")), dash);
|
url.replace(QRegExp(QLatin1String("[^0-9a-zA-Z_.-]")), dash);
|
||||||
@@ -154,3 +140,15 @@ QStringList CloneWizardPage::branches(const QString &repository, int *current)
|
|||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Git
|
} // namespace Git
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void Git::CloneWizardPage::testDirectoryFromRepository()
|
||||||
|
{
|
||||||
|
QFETCH(QString, repository);
|
||||||
|
QFETCH(QString, localDirectory);
|
||||||
|
|
||||||
|
QCOMPARE(directoryFromRepository(repository), localDirectory);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -54,6 +54,11 @@ protected:
|
|||||||
QString directoryFromRepository(const QString &r) const;
|
QString directoryFromRepository(const QString &r) const;
|
||||||
QStringList branches(const QString &repository, int *current);
|
QStringList branches(const QString &repository, int *current);
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
|
public:
|
||||||
|
void testDirectoryFromRepository();
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CloneWizardPagePrivate *d;
|
CloneWizardPagePrivate *d;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -73,14 +73,9 @@ static inline QString detectSsh()
|
|||||||
if (!ssh.isEmpty())
|
if (!ssh.isEmpty())
|
||||||
return ssh;
|
return ssh;
|
||||||
if (Utils::HostOsInfo::isWindowsHost()) { // Windows: Use ssh.exe from git if it cannot be found.
|
if (Utils::HostOsInfo::isWindowsHost()) { // Windows: Use ssh.exe from git if it cannot be found.
|
||||||
const Utils::FileName git = GerritPlugin::gitBinary();
|
Utils::FileName path = GerritPlugin::gitBinDirectory();
|
||||||
if (!git.isEmpty()) {
|
if (!path.isEmpty())
|
||||||
// Is 'git\cmd' in the path (folder containing .bats)?
|
ssh = path.appendPath(QLatin1String(defaultSshC)).toString();
|
||||||
QString path = git.parentDir().toString();
|
|
||||||
if (path.endsWith(QLatin1String("cmd"), Qt::CaseInsensitive))
|
|
||||||
path.replace(path.size() - 3, 3, QLatin1String("bin"));
|
|
||||||
ssh = path + QLatin1Char('/') + QLatin1String(defaultSshC);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ssh;
|
return ssh;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -399,6 +399,11 @@ Utils::FileName GerritPlugin::gitBinary()
|
|||||||
return git;
|
return git;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Utils::FileName GerritPlugin::gitBinDirectory()
|
||||||
|
{
|
||||||
|
return gitClient()->gitBinDirectory();
|
||||||
|
}
|
||||||
|
|
||||||
// Find the branch of a repository.
|
// Find the branch of a repository.
|
||||||
QString GerritPlugin::branch(const QString &repository)
|
QString GerritPlugin::branch(const QString &repository)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ public:
|
|||||||
bool initialize(Core::ActionContainer *ac);
|
bool initialize(Core::ActionContainer *ac);
|
||||||
|
|
||||||
static Utils::FileName gitBinary();
|
static Utils::FileName gitBinary();
|
||||||
|
static Utils::FileName gitBinDirectory();
|
||||||
static QString branch(const QString &repository);
|
static QString branch(const QString &repository);
|
||||||
void addToLocator(Core::CommandLocator *locator);
|
void addToLocator(Core::CommandLocator *locator);
|
||||||
void push(const QString &topLevel);
|
void push(const QString &topLevel);
|
||||||
|
|||||||
@@ -2639,6 +2639,24 @@ bool GitClient::launchGitGui(const QString &workingDirectory) {
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Utils::FileName GitClient::gitBinDirectory()
|
||||||
|
{
|
||||||
|
const QString git = gitBinaryPath();
|
||||||
|
if (git.isEmpty())
|
||||||
|
return Utils::FileName();
|
||||||
|
|
||||||
|
// Is 'git\cmd' in the path (folder containing .bats)?
|
||||||
|
QString path = QFileInfo(git).absolutePath();
|
||||||
|
// Git for Windows (msysGit) has git and gitk redirect executables in {setup dir}/cmd
|
||||||
|
// and the real binaries are in {setup dir}/bin. If cmd is configured in PATH
|
||||||
|
// or in Git settings, return bin instead.
|
||||||
|
if (Utils::HostOsInfo::isWindowsHost()
|
||||||
|
&& path.endsWith(QLatin1String("/cmd"), Utils::HostOsInfo::fileNameCaseSensitivity())) {
|
||||||
|
path.replace(path.size() - 3, 3, QLatin1String("bin"));
|
||||||
|
}
|
||||||
|
return Utils::FileName::fromString(path);
|
||||||
|
}
|
||||||
|
|
||||||
Utils::FileName GitClient::gitBinaryPath(bool *ok, QString *errorMessage) const
|
Utils::FileName GitClient::gitBinaryPath(bool *ok, QString *errorMessage) const
|
||||||
{
|
{
|
||||||
return settings()->gitBinaryPath(ok, errorMessage);
|
return settings()->gitBinaryPath(ok, errorMessage);
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
|
|
||||||
#include <coreplugin/editormanager/ieditor.h>
|
#include <coreplugin/editormanager/ieditor.h>
|
||||||
|
|
||||||
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
#include <QFutureSynchronizer>
|
#include <QFutureSynchronizer>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
@@ -315,6 +317,7 @@ public:
|
|||||||
void launchGitK(const QString &workingDirectory, const QString &fileName);
|
void launchGitK(const QString &workingDirectory, const QString &fileName);
|
||||||
void launchGitK(const QString &workingDirectory) { launchGitK(workingDirectory, QString()); }
|
void launchGitK(const QString &workingDirectory) { launchGitK(workingDirectory, QString()); }
|
||||||
bool launchGitGui(const QString &workingDirectory);
|
bool launchGitGui(const QString &workingDirectory);
|
||||||
|
Utils::FileName gitBinDirectory();
|
||||||
|
|
||||||
void launchRepositoryBrowser(const QString &workingDirectory);
|
void launchRepositoryBrowser(const QString &workingDirectory);
|
||||||
|
|
||||||
|
|||||||
@@ -1041,7 +1041,9 @@ Core::IEditor *GitPlugin::openSubmitEditor(const QString &fileName, const Commit
|
|||||||
default:
|
default:
|
||||||
title = tr("Git Commit");
|
title = tr("Git Commit");
|
||||||
}
|
}
|
||||||
submitEditor->document()->setDisplayName(title);
|
Core::IDocument *document = submitEditor->document();
|
||||||
|
document->setDisplayName(title);
|
||||||
|
VcsBasePlugin::setSource(document, m_submitRepository);
|
||||||
connect(submitEditor, SIGNAL(diff(QStringList,QStringList)), this, SLOT(submitEditorDiff(QStringList,QStringList)));
|
connect(submitEditor, SIGNAL(diff(QStringList,QStringList)), this, SLOT(submitEditorDiff(QStringList,QStringList)));
|
||||||
connect(submitEditor, SIGNAL(merge(QStringList)), this, SLOT(submitEditorMerge(QStringList)));
|
connect(submitEditor, SIGNAL(merge(QStringList)), this, SLOT(submitEditorMerge(QStringList)));
|
||||||
connect(submitEditor, SIGNAL(show(QString,QString)), m_gitClient, SLOT(show(QString,QString)));
|
connect(submitEditor, SIGNAL(show(QString,QString)), m_gitClient, SLOT(show(QString,QString)));
|
||||||
@@ -1487,6 +1489,8 @@ Gerrit::Internal::GerritPlugin *GitPlugin::gerritPlugin() const
|
|||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
|
|
||||||
|
#include "clonewizardpage.h"
|
||||||
|
|
||||||
#include <QTest>
|
#include <QTest>
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(FileStates)
|
Q_DECLARE_METATYPE(FileStates)
|
||||||
@@ -1602,6 +1606,27 @@ void GitPlugin::testLogResolving()
|
|||||||
"50a6b54c - Merge branch 'for-junio' of git://bogomips.org/git-svn",
|
"50a6b54c - Merge branch 'for-junio' of git://bogomips.org/git-svn",
|
||||||
"3587b513 - Update draft release notes to 1.8.2");
|
"3587b513 - Update draft release notes to 1.8.2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GitPlugin::testCloneWizard_directoryFromRepository()
|
||||||
|
{
|
||||||
|
CloneWizardPage page;
|
||||||
|
page.testDirectoryFromRepository();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GitPlugin::testCloneWizard_directoryFromRepository_data()
|
||||||
|
{
|
||||||
|
QTest::addColumn<QString>("repository");
|
||||||
|
QTest::addColumn<QString>("localDirectory");
|
||||||
|
|
||||||
|
QTest::newRow("http") << "http://host/qt/qt.git" << "qt";
|
||||||
|
QTest::newRow("without slash") << "user@host:qt.git" << "qt";
|
||||||
|
QTest::newRow("mainline.git") << "git://gitorious.org/gitorious/mainline.git" << "gitorious";
|
||||||
|
QTest::newRow("local repo (Unix)") << "/home/user/qt-creator.git" << "qt-creator";
|
||||||
|
QTest::newRow("local repo (Windows)") << "c:\\repos\\qt-creator.git" << "qt-creator";
|
||||||
|
QTest::newRow("ssh with port") << "ssh://host:29418/qt/qt.git" << "qt";
|
||||||
|
QTest::newRow("invalid chars removed") << "ssh://host/in%va$lid.git" << "in-va-lid";
|
||||||
|
QTest::newRow("leading dashs removed") << "https://gerrit.local/--leadingDash" << "leadingDash";
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN(GitPlugin)
|
Q_EXPORT_PLUGIN(GitPlugin)
|
||||||
|
|||||||
@@ -149,6 +149,8 @@ private slots:
|
|||||||
void testDiffFileResolving_data();
|
void testDiffFileResolving_data();
|
||||||
void testDiffFileResolving();
|
void testDiffFileResolving();
|
||||||
void testLogResolving();
|
void testLogResolving();
|
||||||
|
void testCloneWizard_directoryFromRepository();
|
||||||
|
void testCloneWizard_directoryFromRepository_data();
|
||||||
#endif
|
#endif
|
||||||
protected:
|
protected:
|
||||||
void updateActions(VcsBase::VcsBasePlugin::ActionState);
|
void updateActions(VcsBase::VcsBasePlugin::ActionState);
|
||||||
|
|||||||
@@ -154,7 +154,11 @@ QString GitVersionControl::vcsTopic(const QString &directory)
|
|||||||
|
|
||||||
QStringList GitVersionControl::additionalToolsPath() const
|
QStringList GitVersionControl::additionalToolsPath() const
|
||||||
{
|
{
|
||||||
return m_client->settings()->searchPathList();
|
QStringList res = m_client->settings()->searchPathList();
|
||||||
|
const QString binaryPath = m_client->gitBinDirectory().toString();
|
||||||
|
if (!binaryPath.isEmpty() && !res.contains(binaryPath))
|
||||||
|
res << binaryPath;
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GitVersionControl::managesDirectory(const QString &directory, QString *topLevel) const
|
bool GitVersionControl::managesDirectory(const QString &directory, QString *topLevel) const
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
actionFind->setEnabled(hasCurrentItem);
|
actionFind->setEnabled(hasCurrentItem);
|
||||||
// open with...
|
// open with...
|
||||||
if (hasCurrentItem && !isDirectory) {
|
if (hasCurrentItem && !isDirectory) {
|
||||||
QMenu *openWith = menu.addMenu(tr("Open with"));
|
QMenu *openWith = menu.addMenu(tr("Open With"));
|
||||||
Core::DocumentManager::populateOpenWithMenu(openWith,
|
Core::DocumentManager::populateOpenWithMenu(openWith,
|
||||||
m_fileSystemModel->filePath(current));
|
m_fileSystemModel->filePath(current));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ void ToolChainInformationConfigWidget::toolChainUpdated(ProjectExplorer::ToolCha
|
|||||||
void ToolChainInformationConfigWidget::manageToolChains()
|
void ToolChainInformationConfigWidget::manageToolChains()
|
||||||
{
|
{
|
||||||
Core::ICore::showOptionsDialog(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
|
Core::ICore::showOptionsDialog(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
|
||||||
Constants::TOOLCHAIN_SETTINGS_PAGE_ID);
|
Constants::TOOLCHAIN_SETTINGS_PAGE_ID,
|
||||||
|
buttonWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolChainInformationConfigWidget::currentToolChainChanged(int idx)
|
void ToolChainInformationConfigWidget::currentToolChainChanged(int idx)
|
||||||
@@ -368,7 +369,8 @@ QWidget *DeviceInformationConfigWidget::buttonWidget() const
|
|||||||
void DeviceInformationConfigWidget::manageDevices()
|
void DeviceInformationConfigWidget::manageDevices()
|
||||||
{
|
{
|
||||||
ICore::showOptionsDialog(Constants::DEVICE_SETTINGS_CATEGORY,
|
ICore::showOptionsDialog(Constants::DEVICE_SETTINGS_CATEGORY,
|
||||||
Constants::DEVICE_SETTINGS_PAGE_ID);
|
Constants::DEVICE_SETTINGS_PAGE_ID,
|
||||||
|
buttonWidget());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceInformationConfigWidget::modelAboutToReset()
|
void DeviceInformationConfigWidget::modelAboutToReset()
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user