[Uml-devel] KDE/kdesdk/umbrello/umbrello

Andi Fischer andi.fischer at hispeed.ch
Sat Dec 31 13:39:03 UTC 2011


SVN commit 1270976 by fischer:

Krazy2 issue - Qt classes that should not be used - fixed.

 M  +5 -12     uml.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #1270975:1270976
@@ -79,7 +79,6 @@
 #include <QtCore/QRegExp>
 #include <QtCore/QTimer>
 #include <QtGui/QClipboard>
-#include <QtGui/QDialogButtonBox>
 #include <QtGui/QSlider>
 #include <QtGui/QToolButton>
 #include <QtGui/QKeyEvent>
@@ -1268,24 +1267,18 @@
  */
 bool UMLApp::slotPrintSettings()
 {
-    if (m_printSettings)
+    if (m_printSettings) {
         delete m_printSettings;
+    }
     m_printSettings = new DiagramPrintPage(0, m_doc);
 
-    QDialog *d = new QDialog;
-    QVBoxLayout *layout = new QVBoxLayout; 
-    layout->addWidget(m_printSettings);
+    KDialog *d = new KDialog();
+    d->setMainWidget(m_printSettings);
 
-    QDialogButtonBox *b = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
-    connect(b, SIGNAL(accepted()), d, SLOT(accept()));
-    connect(b, SIGNAL(rejected()), d, SLOT(reject()));
-    layout->addWidget(b);
-    d->setLayout(layout);
-
     bool result = d->exec() == QDialog::Accepted;
 
     // keep settings
-    layout->removeWidget(m_printSettings);
+    d->setMainWidget(0);
     m_printSettings->setParent(0);
 
     delete d;




More information about the umbrello-devel mailing list