[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/karbon
From:       Jan Hambrecht <jaham () gmx ! net>
Date:       2009-05-14 22:04:49
Message-ID: 1242338689.874017.12116.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 968096 by jaham:

fix some krazy issues



 M  +1 -1      common/KarbonGlobal.h  
 M  +1 -1      common/KarbonGradientHelper.cpp  
 M  +14 -10    ui/KarbonView.cpp  


--- trunk/koffice/karbon/common/KarbonGlobal.h #968095:968096
@@ -87,7 +87,7 @@
     const qreal parallelTolerance = 0.99;
 
     /**
-    * Returns the sign of paramater a.
+    * Returns the sign of parameter a.
     */
     inline int sign( qreal a )
     {
--- trunk/koffice/karbon/common/KarbonGradientHelper.cpp #968095:968096
@@ -258,4 +258,4 @@
         theColor.setAlphaF( prevColor.alphaF() + colorScale * \
(nextColor.alphaF()-prevColor.alphaF()) );  }
     return theColor;
-}
\ No newline at end of file
+}
--- trunk/koffice/karbon/ui/KarbonView.cpp #968095:968096
@@ -400,7 +400,7 @@
 
     QStringList filter;
     filter << "application/x-karbon" << "image/svg+xml" << "image/x-wmf" << \
                "image/x-eps" << "application/postscript";
-    KFileDialog *dialog = new KFileDialog(KUrl("foo"), "", 0);
+    QPointer<KFileDialog> dialog = new KFileDialog(KUrl("foo"), "", 0);
     dialog->setCaption(i18n("Choose Graphic to Add"));
     dialog->setModal(true);
     dialog->setMimeFilter( filter, "application/x-karbon" );
@@ -1038,24 +1038,28 @@
 {
     debugView("KarbonView::configure()");
 
-    KarbonConfigureDialog dialog( this );
-    dialog.exec();
+    QPointer<KarbonConfigureDialog> dialog = new KarbonConfigureDialog( this );
+    dialog->exec();
+    delete dialog;
 }
 
 void KarbonView::pageLayout()
 {
     debugView("KarbonView::pageLayout()");
 
-    KoPageLayoutDialog dlg( this, part()->pageLayout() );
-    dlg.showPageSpread( false );
-    dlg.showTextDirection( false );
-    dlg.setPageSpread( false );
+    QPointer<KoPageLayoutDialog> dlg = new KoPageLayoutDialog( this, \
part()->pageLayout() ); +    dlg->showPageSpread( false );
+    dlg->showTextDirection( false );
+    dlg->setPageSpread( false );
 
-    if( dlg.exec() == QDialog::Accepted )
+    if( dlg->exec() == QDialog::Accepted )
     {
-        part()->setPageLayout( dlg.pageLayout() );
-        emit pageLayoutChanged();
+        if( dlg ) {
+            part()->setPageLayout( dlg->pageLayout() );
+            emit pageLayoutChanged();
+        }
     }
+    delete dlg;
 }
 
 void KarbonView::selectionChanged()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic