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

List:       kde-commits
Subject:    KDE/kdevplatform/shell
From:       Hamish Rodda <rodda () kde ! org>
Date:       2008-04-14 14:17:48
Message-ID: 1208182668.094851.10602.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 796902 by rodda:

Remove deprecated code (replaced by save / load area code)


 M  +0 -32     documentcontroller.cpp  
 M  +0 -7      documentcontroller.h  


--- trunk/KDE/kdevplatform/shell/documentcontroller.cpp #796901:796902
@@ -465,38 +465,6 @@
         d->factories[mimetype] = factory;
 }
 
-void DocumentController::saveDocumentList()
-{
-    if (!d || d->cleaningUp)
-        return;
-
-    KConfigGroup cg = KGlobal::config()->group("Documents");
-    QList<QString> urls;
-    QHash< KUrl, IDocument* >::iterator i, e;
-    for (i = d->documents.begin(), e = d->documents.end(); i != e; ++i)
-        /* prettyUrl strips passwords from URL, which is probably
-           good idea, assuming we don't want passwords to be
-           stored in plain text in random config files. */
-        urls.push_back(i.key().prettyUrl());
-    cg.writeEntry("urls", urls);
-    cg.sync();
-}
-
-void DocumentController::restoreDocumentList()
-{
-    KConfigGroup cg = KGlobal::config()->group("Documents");
-    QList<QString> urls = cg.readEntry("urls", QList<QString>());
-    /* Presently, if an URL was shown in several Sublime::Area
-       instances, we won't properly restore that. The
-       openDocument and Area should coordinate such details
-       in future -- this function only cares about having
-       the right list of URLs opened, not where they are shown. */
-    foreach (const QString& s, urls)
-    {
-        openDocument(KUrl(s));
-    }
-}
-
 void DocumentController::cleanup()
 {
     /* From now on, we don't save document list, so that
--- trunk/KDE/kdevplatform/shell/documentcontroller.h #796901:796902
@@ -86,10 +86,6 @@
 
     void deinitialize();
 
-    /** Read the list of previously opened documents from KGlobal::config()
-        and open them.  */
-    void restoreDocumentList();
-
     void cleanup();
 
     virtual QStringList documentTypes() const;
@@ -127,9 +123,6 @@
 
 private:
     void setupActions();
-    /**Save the list of currently opened document URLs into
-       KGlobal::config().  */
-    void saveDocumentList();
     Q_PRIVATE_SLOT(d, void removeDocument(Sublime::Document*))
     Q_PRIVATE_SLOT(d, void chooseDocument())
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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