forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.0'
Conflicts: src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 573 B |
Binary file not shown.
|
Before Width: | Height: | Size: 583 B |
Binary file not shown.
|
Before Width: | Height: | Size: 530 B |
Binary file not shown.
|
Before Width: | Height: | Size: 583 B |
@@ -77,10 +77,6 @@ SOURCES += \
|
||||
$$PWD/qmljsdescribevalue.cpp \
|
||||
$$PWD/qmljsdialect.cpp
|
||||
|
||||
|
||||
RESOURCES += \
|
||||
$$PWD/qmljs.qrc
|
||||
|
||||
DISTFILES += \
|
||||
$$PWD/parser/qmljs.g
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ QtcLibrary {
|
||||
files: [
|
||||
"jsoncheck.cpp", "jsoncheck.h",
|
||||
"persistenttrie.cpp", "persistenttrie.h",
|
||||
"qmljs.qrc",
|
||||
"qmljs_global.h",
|
||||
"qmljsbind.cpp", "qmljsbind.h",
|
||||
"qmljsbundle.cpp", "qmljsbundle.h",
|
||||
@@ -59,17 +58,6 @@ QtcLibrary {
|
||||
]
|
||||
}
|
||||
|
||||
Group {
|
||||
name: "Images"
|
||||
prefix: "images/"
|
||||
files: [
|
||||
"element.png",
|
||||
"func.png",
|
||||
"property.png",
|
||||
"publicmember.png",
|
||||
]
|
||||
}
|
||||
|
||||
Group {
|
||||
name: "Parser"
|
||||
prefix: "parser/"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/qmljs">
|
||||
<file>images/element.png</file>
|
||||
<file>images/property.png</file>
|
||||
<file>images/publicmember.png</file>
|
||||
<file>images/func.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "qmljsicons.h"
|
||||
|
||||
#include <cplusplus/Icons.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QHash>
|
||||
#include <QIcon>
|
||||
@@ -47,10 +49,6 @@ Icons *Icons::m_instance = 0;
|
||||
class IconsPrivate
|
||||
{
|
||||
public:
|
||||
QIcon elementIcon;
|
||||
QIcon propertyIcon;
|
||||
QIcon publicMemberIcon;
|
||||
QIcon functionDeclarationIcon;
|
||||
QHash<QPair<QString,QString>,QIcon> iconHash;
|
||||
QString resourcePath;
|
||||
};
|
||||
@@ -60,10 +58,6 @@ public:
|
||||
Icons::Icons()
|
||||
: d(new IconsPrivate)
|
||||
{
|
||||
d->elementIcon = QIcon(QLatin1String(":/qmljs/images/element.png"));
|
||||
d->propertyIcon = QIcon(QLatin1String(":/qmljs/images/property.png"));
|
||||
d->publicMemberIcon = QIcon(QLatin1String(":/qmljs/images/publicmember.png"));
|
||||
d->functionDeclarationIcon = QIcon(QLatin1String(":/qmljs/images/func.png"));
|
||||
}
|
||||
|
||||
Icons::~Icons()
|
||||
@@ -117,7 +111,7 @@ QIcon Icons::icon(const QString &packageName, const QString typeName) const
|
||||
return d->iconHash.value(element);
|
||||
}
|
||||
|
||||
QIcon Icons::icon(Node *node) const
|
||||
QIcon Icons::icon(Node *node)
|
||||
{
|
||||
if (dynamic_cast<AST::UiObjectDefinition*>(node))
|
||||
return objectDefinitionIcon();
|
||||
@@ -127,22 +121,22 @@ QIcon Icons::icon(Node *node) const
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
QIcon Icons::objectDefinitionIcon() const
|
||||
QIcon Icons::objectDefinitionIcon()
|
||||
{
|
||||
return d->elementIcon;
|
||||
return CPlusPlus::Icons::iconForType(CPlusPlus::Icons::ClassIconType);
|
||||
}
|
||||
|
||||
QIcon Icons::scriptBindingIcon() const
|
||||
QIcon Icons::scriptBindingIcon()
|
||||
{
|
||||
return d->propertyIcon;
|
||||
return CPlusPlus::Icons::iconForType(CPlusPlus::Icons::VarPublicIconType);
|
||||
}
|
||||
|
||||
QIcon Icons::publicMemberIcon() const
|
||||
QIcon Icons::publicMemberIcon()
|
||||
{
|
||||
return d->publicMemberIcon;
|
||||
return CPlusPlus::Icons::iconForType(CPlusPlus::Icons::FuncPublicIconType);
|
||||
}
|
||||
|
||||
QIcon Icons::functionDeclarationIcon() const
|
||||
QIcon Icons::functionDeclarationIcon()
|
||||
{
|
||||
return d->functionDeclarationIcon;
|
||||
return CPlusPlus::Icons::iconForType(CPlusPlus::Icons::FuncPublicIconType);
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ public:
|
||||
void setIconFilesPath(const QString &iconPath);
|
||||
|
||||
QIcon icon(const QString &packageName, const QString typeName) const;
|
||||
QIcon icon(AST::Node *node) const;
|
||||
static QIcon icon(AST::Node *node);
|
||||
|
||||
QIcon objectDefinitionIcon() const;
|
||||
QIcon scriptBindingIcon() const;
|
||||
QIcon publicMemberIcon() const;
|
||||
QIcon functionDeclarationIcon() const;
|
||||
static QIcon objectDefinitionIcon();
|
||||
static QIcon scriptBindingIcon();
|
||||
static QIcon publicMemberIcon();
|
||||
static QIcon functionDeclarationIcon();
|
||||
|
||||
private:
|
||||
Icons();
|
||||
|
||||
Reference in New Issue
Block a user