diff options
| author | 2010-03-11 07:52:28 +0000 | |
|---|---|---|
| committer | 2010-03-11 07:52:28 +0000 | |
| commit | be9684118cbdb2f80da03331ef5cb9a07ac8c86e (patch) | |
| tree | 9df7c49dfbbfd6619581bdb8a987162da8ba7fe2 /src/modules/classeditor | |
| parent | Some fixes in classeditor (wip) (diff) | |
| download | KVIrc-be9684118cbdb2f80da03331ef5cb9a07ac8c86e.tar.gz KVIrc-be9684118cbdb2f80da03331ef5cb9a07ac8c86e.tar.bz2 KVIrc-be9684118cbdb2f80da03331ef5cb9a07ac8c86e.zip | |
More fixes in classeditor (wip)
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4124 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/classeditor')
| -rw-r--r-- | src/modules/classeditor/classeditor.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/modules/classeditor/classeditor.cpp b/src/modules/classeditor/classeditor.cpp index 933b5eab5..1086bc582 100644 --- a/src/modules/classeditor/classeditor.cpp +++ b/src/modules/classeditor/classeditor.cpp @@ -1522,6 +1522,11 @@ void KviClassEditor::loadNotBuiltClasses() } for(QString * s = names.first(); s; s = names.next()) { + if (KviQString::equalCI(*s,"@inherits")) + { + pClassItem->setInheritsClass(cfg.readQStringEntry(*s,"")); + continue; + } QString szCode = cfg.readQStringEntry(*s,""); KviClassEditorTreeWidgetItem *pFunctionItem=new KviClassEditorTreeWidgetItem(pClassItem,KviClassEditorTreeWidgetItem::Method,*s); pFunctionItem->setBuffer(szCode); @@ -1538,20 +1543,17 @@ void KviClassEditor::saveNotBuiltClasses() QString szBuffer; g_pApp->getLocalKvircDirectory(szBuffer,KviApp::ConfigPlugins,szFileName); KviConfig cfg(szBuffer,KviConfig::Write); - int iCount=0; - while(it.current()) + while(it.current()) { - if (it.current()->classNotBuilt()) - { - debug("saving class %s",it.currentKey().toUtf8().data()); - cfg.setGroup(it.currentKey()); - for(int i=0;i<it.current()->childCount();i++) - { - cfg.writeEntry(((KviClassEditorTreeWidgetItem*)it.current()->child(i))->name(),((KviClassEditorTreeWidgetItem*)it.current()->child(i))->buffer()); - } - iCount++; - } - ++it; + if (it.current()->classNotBuilt()) + { + debug("saving class %s",it.currentKey().toUtf8().data()); + cfg.setGroup(it.currentKey()); + cfg.writeEntry("@inheriths",it.current()->InheritsClass()); + for(int i=0;i<it.current()->childCount();i++) + cfg.writeEntry(((KviClassEditorTreeWidgetItem*)it.current()->child(i))->name(),((KviClassEditorTreeWidgetItem*)it.current()->child(i))->buffer()); + } + ++it; } } |
