[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdewebdev
From: Andras Mantia <amantia () kde ! org>
Date: 2004-12-19 12:35:24
Message-ID: 20041219123524.1A7EC19D31 () office ! kde ! org
[Download RAW message or body]
CVS commit by amantia:
Remove the entry from the downloaded resource list if the user refused to install \
(because of some validity problems).
M +18 -0 lib/newstuff/qnewstuff.cpp 1.5
M +2 -0 lib/newstuff/qnewstuff.h 1.4
M +2 -2 quanta/quanta.kdevelop 1.284
M +5 -5 quanta/src/quanta.cpp 1.669
--- kdewebdev/lib/newstuff/qnewstuff.cpp #1.4:1.5
@@ -15,4 +15,5 @@
//kde includes
+#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -129,4 +130,14 @@ void QNewStuff::slotValidated(int result
installResource();
emit installFinished();
+ } else
+ {
+ KConfig *cfg = KGlobal::config();
+ cfg->deleteGroup("KNewStuffStatus");
+ cfg->setGroup("KNewStuffStatus");
+ for (QMap<QString, QString>::ConstIterator it = \
m_installedResources.constBegin(); it != m_installedResources.constEnd(); ++it) + \
{ + cfg->writeEntry(it.key(), it.data());
+ }
+ cfg->sync();
}
if (m_tempDir)
@@ -138,4 +149,11 @@ void QNewStuff::slotValidated(int result
}
+void QNewStuff::downloadResource()
+{
+ KConfig *cfg = KGlobal::config();
+ m_installedResources = cfg->entryMap("KNewStuffStatus");
+ KNewStuff::download();
+}
+
bool QNewStuff::createUploadFile(const QString &fileName)
{
--- kdewebdev/lib/newstuff/qnewstuff.h #1.3:1.4
@@ -43,4 +43,5 @@ public:
/** Creates a tarball to be uploaded */
bool createUploadFile( const QString &fileName );
+ void downloadResource();
private slots:
@@ -57,4 +58,5 @@ protected:
KTempDir *m_tempDir;
QString m_tarName;
+ QMap<QString, QString> m_installedResources;
};
--- kdewebdev/quanta/quanta.kdevelop #1.283:1.284
@@ -243,8 +243,8 @@
<kdevfilecreate>
<filetypes>
- <type icon="" ext="h" name="C++ header" create="template" >
+ <type icon="" ext="h" create="template" name="C++ header" >
<descr>Quanta speicfic header</descr>
</type>
- <type icon="source_cpp" ext="cpp" name="C++ source" create="template" >
+ <type icon="source_cpp" ext="cpp" create="template" name="C++ source" >
<descr>A new empty C++ file.</descr>
</type>
--- kdewebdev/quanta/src/quanta.cpp #1.668:1.669
@@ -3403,5 +3403,5 @@ void QuantaApp::slotDownloadDTEP()
if (!m_newDTEPStuff)
m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this);
- m_newDTEPStuff->download();
+ m_newDTEPStuff->downloadResource();
}
@@ -3414,5 +3414,5 @@ void QuantaApp::slotDownloadToolbar()
if (!m_newToolbarStuff)
m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this);
- m_newToolbarStuff->download();
+ m_newToolbarStuff->downloadResource();
}
@@ -3437,5 +3437,5 @@ void QuantaApp::slotDownloadTemplate()
if (!m_newTemplateStuff)
m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this);
- m_newTemplateStuff->download();
+ m_newTemplateStuff->downloadResource();
}
@@ -3444,5 +3444,5 @@ void QuantaApp::slotDownloadScript()
if (!m_newScriptStuff)
m_newScriptStuff = new QNewScriptStuff("quanta/script", this);
- m_newScriptStuff->download();
+ m_newScriptStuff->downloadResource();
}
@@ -3454,5 +3454,5 @@ void QuantaApp::slotDownloadDoc()
connect(m_newDocStuff, SIGNAL(installFinished()), dTab, \
SLOT(slotRefreshTree())); }
- m_newDocStuff->download();
+ m_newDocStuff->downloadResource();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic