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

List:       kde-commits
Subject:    playground/office/flake
From:       Yann Bodson <yann.bodson () online ! fr>
Date:       2006-05-16 0:50:22
Message-ID: 1147740622.150336.18596.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 541350 by ybodson:

make it compile (on my system) by using qt functions when possible.
(unless there are good reasons to do otherwise...)


 M  +1 -1      lib/KoShapeContainer.cpp  
 M  +2 -2      lib/KoShapeManager.cpp  
 M  +1 -1      testapp/Image.cpp  


--- trunk/playground/office/flake/lib/KoShapeContainer.cpp #541349:541350
@@ -73,7 +73,7 @@
         return;
 
     QList<KoShape*> sorterdObjects = m_children->iterator();
-    std::sort(sorterdObjects.begin(), sorterdObjects.end(), KoShape::compareShapeZIndex);
+    qSort(sorterdObjects.begin(), sorterdObjects.end(), KoShape::compareShapeZIndex);
     painter.setMatrix( m_invMatrix * painter.matrix() );
     QMatrix myMatrix = transformationMatrix(&converter);
     foreach (KoShape *shape, sorterdObjects) {
--- trunk/playground/office/flake/lib/KoShapeManager.cpp #541349:541350
@@ -77,7 +77,7 @@
     QPen pen(Qt::NoPen);  // painters by default have a black stroke, lets turn that off.
     painter.setPen(pen);
     QList<KoShape*> sorterdObjects(m_objects);
-    std::sort(sorterdObjects.begin(), sorterdObjects.end(), KoShape::compareShapeZIndex);
+    qSort(sorterdObjects.begin(), sorterdObjects.end(), KoShape::compareShapeZIndex);
     const QRegion clipRegion = painter.clipRegion();
     foreach ( KoShape * shape, sorterdObjects ) {
         if(! shape->isVisible())
@@ -119,7 +119,7 @@
 KoShape * KoShapeManager::getObjectAt( const QPointF &position )
 {
     QList<KoShape*> sorterdObjects(m_objects);
-    std::sort(sorterdObjects.begin(), sorterdObjects.end(), KoShape::compareShapeZIndex);
+    qSort(sorterdObjects.begin(), sorterdObjects.end(), KoShape::compareShapeZIndex);
     for(int count = sorterdObjects.count()-1; count >= 0; count--) {
         if ( sorterdObjects.at(count)->hitTest( position ) )
         {
--- trunk/playground/office/flake/testapp/Image.cpp #541349:541350
@@ -25,7 +25,7 @@
 Image::Image(QString url) {
     QImageReader reader(url);
     if(! reader.canRead()) {
-        printf("Can't read image!");
+        qWarning( "Can't read image!" );
         return;
     }
     m_image = reader.read();
[prev in list] [next in list] [prev in thread] [next in thread] 

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