Fix dialog instances
authorKevin Krammer <kevin.krammer@kdab.com>
Wed, 16 Jan 2013 14:42:50 +0000 (15:42 +0100)
committerKevin Krammer <kevin.krammer@kdab.com>
Wed, 16 Jan 2013 14:42:50 +0000 (15:42 +0100)
lib/declarativecolordialog.cpp
lib/declarativefiledialog.cpp
lib/declarativefontdialog.cpp
lib/declarativeinputdialog.cpp

index daffc78..11927fb 100644 (file)
@@ -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)
index f93de46..9696448 100644 (file)
@@ -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)
index 977e23f..c379037 100644 (file)
@@ -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)
index 90a785e..2ae9e58 100644 (file)
@@ -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()));