File fix-compile.diff of Package knoda

--- hk_kdeclasses/hk_kdedbdesigner.cpp
+++ hk_kdeclasses/hk_kdedbdesigner.cpp
@@ -1416,11 +1416,13 @@
 id[2]=context->insertItem(i18n("Delete"));
 int res=context->exec(QCursor::pos());
 
+#if 0
 if (res==id[0])
 	{
 
 	}
 else
+#endif
 if (res==id[1])
 	{
       	  edit();
--- hk_kdeclasses/hk_kdegridcolumndialog.cpp
+++ hk_kdeclasses/hk_kdegridcolumndialog.cpp
@@ -153,10 +153,10 @@
     QListViewItem* f=rightbox->currentItem();
 
 //QListViewItem* p=NULL;
-    if (f==NULL||p_currentfieldit==NULL)  return;
+    if (f==NULL||p_currentfieldit==fields.end())  return;
     f->itemBelow();
 
-    if (p_currentfieldit!=fields.end()&&p_currentfieldit!=NULL)
+    if (p_currentfieldit!=fields.end())
     {
         fields.erase(p_currentfieldit);
         p_currentfieldit=fields.end();
--- hk_kdeclasses/hk_kdetabledesign.cpp
+++ hk_kdeclasses/hk_kdetabledesign.cpp
@@ -55,7 +55,6 @@
     hk_kdetabledesignLayout = new QGridLayout( this );
     hk_kdetabledesignLayout->setSpacing( 6 );
     hk_kdetabledesignLayout->setMargin( 11 );
-    actualfieldit==NULL;
 
     indexwindow=new QListView(this,"indexwindow");
     indexwindow->addColumn( i18n( "Index" ) );
@@ -546,7 +545,7 @@
     QListViewItem* f=fieldlist->currentItem();
 
     QListViewItem* p=NULL;
-    if (f==NULL||actualfieldit==NULL)  return;
+    if (f==NULL||actualfieldit==fields.end())  return;
     f->itemBelow();
 
     if ((*actualfieldit).state!=newfield)
@@ -616,7 +615,7 @@
 void hk_kdetabledesign::name_changed()
 {
     QListViewItem* i=fieldlist->currentItem();
-    if (i==NULL||actualfieldit==NULL)return;
+    if (i==NULL||actualfieldit==fields.end())return;
     (*actualfieldit).newname=u2l(namefield->text().utf8().data());
     if ((*actualfieldit).state!=newfield&&(*actualfieldit).state!=delfield) (*actualfieldit).state=altered;
     i->setText(0,namefield->text());
@@ -627,7 +626,7 @@
 void hk_kdetabledesign::primary_changed()
 {
     QListViewItem* i=fieldlist->currentItem();
-    if (i==NULL||actualfieldit==NULL)return;
+    if (i==NULL||actualfieldit==fields.end())return;
     (*actualfieldit).newprimary=primaryfield->isChecked();
     if ((*actualfieldit).state!=newfield&&(*actualfieldit).state!=delfield) (*actualfieldit).state=altered;
     QString a=primaryfield->isChecked()?i18n("yes"):i18n("no");
@@ -639,7 +638,7 @@
 void hk_kdetabledesign::notnull_changed()
 {
     QListViewItem* i=fieldlist->currentItem();
-    if (i==NULL||actualfieldit==NULL)return;
+    if (i==NULL||actualfieldit==fields.end())return;
     (*actualfieldit).newnotnull=notnullfield->isChecked();
     if ((*actualfieldit).state!=newfield&&(*actualfieldit).state!=delfield) (*actualfieldit).state=altered;
     QString a=notnullfield->isChecked()?i18n("yes"):i18n("no");
@@ -652,7 +651,7 @@
 void hk_kdetabledesign::size_changed()
 {
     QListViewItem* i=fieldlist->currentItem();
-    if (i==NULL||actualfieldit==NULL)return;
+    if (i==NULL||actualfieldit==fields.end())return;
     (*actualfieldit).newsize=sizefield->value();
     i->setText(2,sizefield->text());
     structure_changes(true);
@@ -664,7 +663,7 @@
 void hk_kdetabledesign::type_changed()
 {
     QListViewItem* i=fieldlist->currentItem();
-    if (i==NULL||actualfieldit==NULL)return;
+    if (i==NULL||actualfieldit==fields.end())return;
     if ((*actualfieldit).state!=newfield&&(*actualfieldit).state!=delfield) (*actualfieldit).state=altered;
     (*actualfieldit).newtype=ftype(typefield->currentText());
     i->setText(1,typefield->currentText());
@@ -790,7 +789,6 @@
 #endif
     fieldlist->blockSignals(true);
     fieldlist->clear();
-    actualfieldit==NULL;
     lastmarkedItem=NULL;
     fields.erase(fields.begin(),fields.end());
     hk_datasource* d=datasource();
@@ -1069,7 +1067,7 @@
 
 void hk_kdetabledesign::set_fields_enabled(void)
 {
-    if (actualfieldit==NULL)return;
+    if (actualfieldit==fields.end())return;
     sizefield->setEnabled((*actualfieldit).newtype==hk_column::textcolumn);
 
 }
openSUSE Build Service is sponsored by