From: Kevin Krammer Date: Wed, 16 Jan 2013 14:42:50 +0000 (+0100) Subject: Fix dialog instances X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=8de12c29be5adde39b075e247b6e6379668b88e9;p=konrad%2FDeclarativeWidgets.git Fix dialog instances --- diff --git a/lib/declarativecolordialog.cpp b/lib/declarativecolordialog.cpp index daffc78..11927fb 100644 --- a/lib/declarativecolordialog.cpp +++ b/lib/declarativecolordialog.cpp @@ -86,8 +86,11 @@ QColor DeclarativeColorDialogAttached::getColor(const QColor &initialColor) return QColorDialog::getColor(initialColor, parent); } +Q_DECLARE_METATYPE(Qt::WindowFlags) + DeclarativeColorDialog::DeclarativeColorDialog(QWidget *parent) : QColorDialog(parent) { + setProperty("originalWindowFlags", QVariant::fromValue(windowFlags())); } DeclarativeColorDialogAttached *DeclarativeColorDialog::qmlAttachedProperties(QObject *parent) diff --git a/lib/declarativefiledialog.cpp b/lib/declarativefiledialog.cpp index f93de46..9696448 100644 --- a/lib/declarativefiledialog.cpp +++ b/lib/declarativefiledialog.cpp @@ -156,10 +156,12 @@ void DeclarativeFileDialogAttached::setSelectedFilter(const QString &filter) emit selectedFilterChanged(filter); } +Q_DECLARE_METATYPE(Qt::WindowFlags) DeclarativeFileDialog::DeclarativeFileDialog(QWidget *parent) : QFileDialog(parent) { + setProperty("originalWindowFlags", QVariant::fromValue(windowFlags())); } DeclarativeFileDialogAttached *DeclarativeFileDialog::qmlAttachedProperties(QObject *parent) diff --git a/lib/declarativefontdialog.cpp b/lib/declarativefontdialog.cpp index 977e23f..c379037 100644 --- a/lib/declarativefontdialog.cpp +++ b/lib/declarativefontdialog.cpp @@ -109,9 +109,12 @@ void DeclarativeFontDialogAttached::setDialogAccepted(bool accepted) emit dialogAcceptedChanged(accepted); } +Q_DECLARE_METATYPE(Qt::WindowFlags) + DeclarativeFontDialog::DeclarativeFontDialog(QWidget *parent) : QFontDialog(parent) { + setProperty("originalWindowFlags", QVariant::fromValue(windowFlags())); } DeclarativeFontDialogAttached *DeclarativeFontDialog::qmlAttachedProperties(QObject *parent) diff --git a/lib/declarativeinputdialog.cpp b/lib/declarativeinputdialog.cpp index 90a785e..2ae9e58 100644 --- a/lib/declarativeinputdialog.cpp +++ b/lib/declarativeinputdialog.cpp @@ -275,8 +275,12 @@ void DeclarativeInputDialogAttached::setDialogAccepted(bool accepted) emit dialogAcceptedChanged(accepted); } +Q_DECLARE_METATYPE(Qt::WindowFlags) + DeclarativeInputDialog::DeclarativeInputDialog(QWidget *parent) : QInputDialog(parent) { + setProperty("originalWindowFlags", QVariant::fromValue(windowFlags())); + connect(this, SIGNAL(textValueChanged(QString)), this, SIGNAL(customTextValueChanged())); connect(this, SIGNAL(intValueChanged(int)), this, SIGNAL(customIntValueChanged())); connect(this, SIGNAL(doubleValueChanged(double)), this, SIGNAL(customDoubleValueChanged()));