Commit 662e6b0f authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa
Browse files

Save a temporary QString creation.

We were calling KFileDialog::getSaveFileName and then creating a KUrl
ourselves. Just use KFileDialog::getSaveUrl instead.

svn path=/trunk/KDE/kdeutils/ark/; revision=1186868
parent 3708000a
...@@ -235,12 +235,13 @@ void MainWindow::newArchive() ...@@ -235,12 +235,13 @@ void MainWindow::newArchive()
kDebug() << "Supported mimetypes are" << mimeTypes.join( QLatin1String( " " )); kDebug() << "Supported mimetypes are" << mimeTypes.join( QLatin1String( " " ));
QString saveFile = KFileDialog::getSaveFileName(KUrl("kfiledialog:///ArkNewDir"), const KUrl saveFileUrl =
mimeTypes.join( QLatin1String( " " ))); KFileDialog::getSaveUrl(KUrl("kfiledialog:///ArkNewDir"),
mimeTypes.join(QLatin1String(" ")));
m_openArgs.metaData()[QLatin1String( "createNewArchive" )] = QLatin1String( "true" ); m_openArgs.metaData()[QLatin1String( "createNewArchive" )] = QLatin1String( "true" );
openUrl(KUrl(saveFile)); openUrl(saveFileUrl);
m_openArgs.metaData().remove(QLatin1String( "showExtractDialog" )); m_openArgs.metaData().remove(QLatin1String( "showExtractDialog" ));
m_openArgs.metaData().remove(QLatin1String( "createNewArchive" )); m_openArgs.metaData().remove(QLatin1String( "createNewArchive" ));
......
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