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

List:       kde-commits
Subject:    branches/work/soc-parley/parley/practice
From:       Frederik Gladhorn <frederik.gladhorn () gmx ! de>
Date:       2008-05-31 11:17:55
Message-ID: 1212232675.541762.27192.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 814823 by gladhorn:

load file from parley config

 M  +13 -1     parleypracticemainwindow.cpp  


--- branches/work/soc-parley/parley/practice/parleypracticemainwindow.cpp \
#814822:814823 @@ -78,7 +78,19 @@
     //// Loading the Document -- temporary ////
     KEduVocDocument * doc = new KEduVocDocument(this);
     //KUrl url = KFileDialog::getOpenUrl(KUrl::fromPath("~"), \
KEduVocDocument::pattern(KEduVocDocument::Reading), this, i18n("Open Vocabulary \
                Document"));
-    int code = doc->open(KUrl::fromPath("~/test.kvtml"));
+
+
+    // for the fun of it - use parleyrc
+    kDebug() << "open file from parleyrc";
+    KConfig parleyConfig("parleyrc");
+    kDebug() << parleyConfig.groupList();
+    KConfigGroup recentFilesGroup( &parleyConfig, "Recent Files" );
+    // take the last file, but there are File1..n and Name1..n entries..
+    QString sourceFile = recentFilesGroup.readEntry( \
recentFilesGroup.keyList().value(recentFilesGroup.keyList().count()/2-1), QString() \
); +
+
+// KUrl::fromPath("~/test.kvtml")
+    int code = doc->open(sourceFile);
     kDebug() << code;
     
     // this is the only object/widget the window directly keeps track of (outside of \
the canvas, etc).


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

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