Commit 8eecf8fc authored by Kai Koehne's avatar Kai Koehne
Browse files

Qml: Fix more invalid NOTIFY signals

Remove unimplemented NOTIFY signals. Furthermore the signals must
be declared in the same class as the Q_PROPERTY (not in a base class):
Fix this in filefilteritems.h.
parent a1289a6e
......@@ -123,7 +123,7 @@ class QWidgetDeclarativeUI : public QObject
Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
Q_PROPERTY(QUrl styleSheetFile READ styleSheetFile WRITE setStyleSheetFile NOTIFY styleSheetFileChanged)
Q_PROPERTY(QUrl styleSheetFile READ styleSheetFile WRITE setStyleSheetFile)
Q_PROPERTY(QColor windowColor READ windowColor WRITE setWindowColor)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
......@@ -782,7 +782,7 @@ private:
class QComboBoxDeclarativeUI : public QObject
{
Q_OBJECT
Q_PROPERTY(QStringList items READ items WRITE setItems NOTIFY itemChanged)
Q_PROPERTY(QStringList items READ items WRITE setItems)
Q_PROPERTY(QString currentText READ currentText WRITE setCurrentText NOTIFY currentTextChanged)
public:
......@@ -879,7 +879,7 @@ class WidgetLoader : public QWidget
Q_PROPERTY(QString sourceString READ sourceString WRITE setSourceString NOTIFY sourceChanged)
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl)
Q_PROPERTY(QString qmlData READ qmlData WRITE setQmlData NOTIFY sourceQmlDataChanged)
Q_PROPERTY(QString qmlData READ qmlData WRITE setQmlData NOTIFY qmlDataChanged)
Q_PROPERTY(QWidget *widget READ widget NOTIFY widgetChanged)
Q_PROPERTY(QDeclarativeComponent *component READ component NOTIFY sourceChanged)
......
......@@ -82,7 +82,7 @@ class PropertyEditorValue : public QObject
Q_PROPERTY(bool isInModel READ isInModel NOTIFY valueChangedQml FINAL)
Q_PROPERTY(bool isInSubState READ isInSubState NOTIFY valueChangedQml FINAL)
Q_PROPERTY(bool isBound READ isBound NOTIFY isBoundChanged FINAL)
Q_PROPERTY(bool isValid READ isValid NOTIFY isValid FINAL)
Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged FINAL)
Q_PROPERTY(QString name READ name FINAL)
Q_PROPERTY(PropertyEditorNodeWrapper* complexNode READ complexNode NOTIFY complexNodeChanged FINAL)
......
......@@ -51,7 +51,6 @@ void FileFilterBaseItem::setFilter(const QString &filter)
m_regExpList << QRegExp(pattern, Qt::CaseInsensitive, QRegExp::Wildcard);
}
emit filterChanged();
updateFileList();
}
......@@ -222,13 +221,18 @@ QmlFileFilterItem::QmlFileFilterItem(QObject *parent)
setFilter(QLatin1String("*.qml"));
}
JsFileFilterItem::JsFileFilterItem(QObject *parent)
: FileFilterBaseItem(parent)
{
setFilter(QLatin1String("*.js"));
}
void JsFileFilterItem::setFilter(const QString &filter)
{
FileFilterBaseItem::setFilter(filter);
emit filterChanged();
}
ImageFileFilterItem::ImageFileFilterItem(QObject *parent)
: FileFilterBaseItem(parent)
{
......@@ -241,11 +245,23 @@ ImageFileFilterItem::ImageFileFilterItem(QObject *parent)
setFilter(filter);
}
void ImageFileFilterItem::setFilter(const QString &filter)
{
FileFilterBaseItem::setFilter(filter);
emit filterChanged();
}
CssFileFilterItem::CssFileFilterItem(QObject *parent)
: FileFilterBaseItem(parent)
{
setFilter(QLatin1String("*.css"));
}
void CssFileFilterItem::setFilter(const QString &filter)
{
FileFilterBaseItem::setFilter(filter);
emit filterChanged();
}
} // namespace QmlProjectManager
......@@ -46,7 +46,6 @@ signals:
void recursiveChanged();
void pathsChanged();
void filesChanged(const QSet<QString> &added, const QSet<QString> &removed);
void filterChanged();
private slots:
void updateFileList();
......@@ -89,7 +88,12 @@ public:
class JsFileFilterItem : public FileFilterBaseItem {
Q_OBJECT
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged())
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
void setFilter(const QString &filter);
signals:
void filterChanged();
public:
JsFileFilterItem(QObject *parent = 0);
......@@ -97,7 +101,12 @@ public:
class ImageFileFilterItem : public FileFilterBaseItem {
Q_OBJECT
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged())
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
void setFilter(const QString &filter);
signals:
void filterChanged();
public:
ImageFileFilterItem(QObject *parent = 0);
......@@ -105,7 +114,12 @@ public:
class CssFileFilterItem : public FileFilterBaseItem {
Q_OBJECT
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged())
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
void setFilter(const QString &filter);
signals:
void filterChanged();
public:
CssFileFilterItem(QObject *parent = 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment