getNewStuff: Use QPointer [krazy 29/37] by Mikko Rapeli

parent e528979c
...@@ -3756,13 +3756,14 @@ int MainWindow::getNewStuff(const QString &configFile) ...@@ -3756,13 +3756,14 @@ int MainWindow::getNewStuff(const QString &configFile)
{ {
KNS3::Entry::List entries; KNS3::Entry::List entries;
#if KDE_IS_VERSION(4,3,80) #if KDE_IS_VERSION(4,3,80)
KNS3::DownloadDialog dialog(configFile); QPointer<KNS3::DownloadDialog> dialog = new KNS3::DownloadDialog(configFile);
dialog.exec(); dialog->exec();
entries = dialog.changedEntries(); entries = dialog->changedEntries();
foreach(const KNS3::Entry & entry, entries) { foreach(const KNS3::Entry & entry, entries) {
if (entry.status() == KNS3::Entry::Installed) if (entry.status() == KNS3::Entry::Installed)
kDebug() << "// Installed files: " << entry.installedFiles(); kDebug() << "// Installed files: " << entry.installedFiles();
} }
delete dialog;
#else #else
KNS::Engine engine(0); KNS::Engine engine(0);
if (engine.init(configFile)) if (engine.init(configFile))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment