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

List:       kde-commits
Subject:    koffice/kexi
From:       Jarosław Staniek <staniek () kde ! org>
Date:       2010-03-30 20:25:04
Message-ID: 20100330202504.5F216AC88A () svn ! kde ! org
[Download RAW message or body]

SVN commit 1109232 by staniek:

warnings--


 M  +26 -29    shapes/relationdesign/kexirelationdesignshape.cpp  
 M  +19 -13    shapes/relationdesign/kexirelationdesigntool.cpp  
 M  +2 -2      widget/tableview/KexiTableViewColumn.cpp  
 M  +4 -1      widget/tableview/kexitableview.cpp  


--- trunk/koffice/kexi/shapes/relationdesign/kexirelationdesignshape.cpp \
#1109231:1109232 @@ -97,32 +97,32 @@
 
 bool KexiRelationDesignShape::loadOdfFrameElement( const KoXmlElement & element, \
KoShapeLoadingContext & context )  {
+    Q_UNUSED(context);
+    KoXmlElement relation = KoXml::namedItemNS(element, \
"http://www.koffice.org/kexirelationdesign", "relation"); +    if (relation.isNull()) \
{ +        kWarning() << "no relation element as first child";
+        return false;
+    }
 
-KoXmlElement relation = KoXml::namedItemNS(element, \
                "http://www.koffice.org/kexirelationdesign", "relation");
-if (relation.isNull()) {
-    kWarning() << "no relation element as first child";
-    return false;
-}
+    kDebug() << relation.attributeNames();
 
-kDebug() << relation.attributeNames();
+    m_database = relation.attribute("database");
+    m_relation = relation.attribute("relation");
 
-m_database = relation.attribute("database");
-m_relation = relation.attribute("relation");
+    KoXmlElement e;
+    m_fieldData.clear();
 
-KoXmlElement e;
-m_fieldData.clear();
-
-forEachElement(e, relation) {
-    SimpleField *sf = new SimpleField();
-    sf->name = e.attribute("name");
-    sf->type = e.attribute("type");
-    sf->pkey = e.attribute("primarykey").toInt();
-    sf->notnull = e.attribute("notnull").toInt();
-    m_fieldData.append(sf);
+    forEachElement(e, relation) {
+        SimpleField *sf = new SimpleField();
+        sf->name = e.attribute("name");
+        sf->type = e.attribute("type");
+        sf->pkey = e.attribute("primarykey").toInt();
+        sf->notnull = e.attribute("notnull").toInt();
+        m_fieldData.append(sf);
+    }
+    addConnectionPoints();
+    return true;
 }
-addConnectionPoints();
-return true;
-}
 
 void KexiRelationDesignShape::paint ( QPainter& painter, const KoViewConverter& \
converter ) {  constPaint(painter, converter);
@@ -236,11 +236,9 @@
         }
         if (m_relationSchema) { //We have the schema, so lets lets paint it
             KexiDB::QueryColumnInfo::Vector columns = \
                m_relationSchema->columns(true);
-            uint i = 0;
             foreach(KexiDB::QueryColumnInfo *column, columns) {
                 m_fieldData.append(new SimpleField(column));
             }
-            
         }
         addConnectionPoints();
         update();
@@ -249,21 +247,20 @@
 
 void KexiRelationDesignShape::addConnectionPoints()
 {
-    uint i = 0;
-    int offset = 0;
+    const int point_count = connectionPoints().count();
 
-    int point_count = connectionPoints().count();
-
     for (int j = 0; j < point_count; ++j) {
         removeConnectionPoint(0);
     }
-    
+
+    uint i = 0;
+    int offset = 0;
     foreach (SimpleField *column, m_fieldData) {
+        Q_UNUSED(column);
         ++i;
         offset = (13.0*i) + 15;
         addConnectionPoint(QPointF(0,offset));
         addConnectionPoint(QPointF(boundingRect().width(), offset));
-
     }
 }
 
--- trunk/koffice/kexi/shapes/relationdesign/kexirelationdesigntool.cpp \
#1109231:1109232 @@ -33,25 +33,30 @@
 #include <kdebug.h>
 #include <KComboBox>
 
-KexiRelationDesignTool::KexiRelationDesignTool ( KoCanvasBase* canvas ) : KoToolBase \
( canvas ) { +KexiRelationDesignTool::KexiRelationDesignTool ( KoCanvasBase* canvas ) \
: KoToolBase ( canvas ) +{
     m_dbDialog = 0;
-    
 }
 
-void KexiRelationDesignTool::mouseReleaseEvent ( KoPointerEvent* event ) {
-
+void KexiRelationDesignTool::mouseReleaseEvent ( KoPointerEvent* event )
+{
+    Q_UNUSED(event);
 }
 
-void KexiRelationDesignTool::mouseMoveEvent ( KoPointerEvent* event ) {
-
+void KexiRelationDesignTool::mouseMoveEvent ( KoPointerEvent* event )
+{
+    Q_UNUSED(event);
 }
 
-void KexiRelationDesignTool::mousePressEvent ( KoPointerEvent* event ) {
-
+void KexiRelationDesignTool::mousePressEvent ( KoPointerEvent* event )
+{
+    Q_UNUSED(event);
 }
 
-void KexiRelationDesignTool::paint ( QPainter& painter, const KoViewConverter& \
                converter ) {
-
+void KexiRelationDesignTool::paint ( QPainter& painter, const KoViewConverter& \
converter ) +{
+    Q_UNUSED(painter);
+    Q_UNUSED(converter);
 }
 
 void KexiRelationDesignTool::activate(ToolActivation toolActivation, const \
QSet<KoShape*> &shapes) @@ -70,11 +75,12 @@
     useCursor(Qt::ArrowCursor);
 }
 
-void KexiRelationDesignTool::deactivate ( ) {
-    
+void KexiRelationDesignTool::deactivate()
+{
 }
 
-QWidget* KexiRelationDesignTool::createOptionWidget() {
+QWidget* KexiRelationDesignTool::createOptionWidget()
+{
     QWidget *optionWidget = new QWidget();
     QVBoxLayout *layout = new QVBoxLayout(optionWidget);
     
--- trunk/koffice/kexi/widget/tableview/KexiTableViewColumn.cpp #1109231:1109232
@@ -51,9 +51,9 @@
 //------------------------
 
 KexiTableViewColumn::KexiTableViewColumn(KexiDB::Field& f, bool owner)
-        : m_columnInfo(0)
+        : m_field(&f)
+        , m_columnInfo(0)
         , m_visibleLookupColumnInfo(0)
-        , m_field(&f)
         , d(new Private)
 {
     m_isDBAware = false;
--- trunk/koffice/kexi/widget/tableview/kexitableview.cpp #1109231:1109232
@@ -78,6 +78,7 @@
         : alternateBackgroundColor(
             KColorScheme(QPalette::Active, \
KColorScheme::View).background(KColorScheme::AlternateBackground).color())  {
+    Q_UNUSED(widget)
     //set defaults
     if (qApp) {
         baseColor = KColorScheme(QPalette::Active, \
KColorScheme::View).background().color()/*QPalette::Base*/; @@ -584,6 +585,8 @@
                                     QPainter *pb, int r, int rowp, int cx, int cy,
                                     int colfirst, int collast, int maxwc)
 {
+    Q_UNUSED(cx);
+    Q_UNUSED(cy);
     if (!record)
         return;
     
@@ -2126,7 +2129,7 @@
 
 #ifndef KEXI_NO_PRINT
 void
-KexiTableView::print(QPrinter &printer, QPrintDialog &printDialog)
+KexiTableView::print(QPrinter & /*printer*/ , QPrintDialog & /*printDialog*/)
 {
 // printer.setFullPage(true);
 #if 0


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

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