[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kleopatra/commands
From: Volker Krause <vkrause () kde ! org>
Date: 2010-12-08 8:17:52
Message-ID: 20101208081752.0DC4BAC8A7 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1204580 by vkrause:
Less aggressive disabling in certificate import when we don't have
QFileDialog. Should make it work on WinCE.
M +6 -4 importcertificatefromfilecommand.cpp
--- trunk/KDE/kdepim/kleopatra/commands/importcertificatefromfilecommand.cpp \
#1204579:1204580 @@ -36,6 +36,7 @@
#include "importcertificatescommand_p.h"
#include "utils/classify.h"
+#include "utils/filedialog.h"
#include <kleo/cryptobackendfactory.h>
#include <kleo/importjob.h>
@@ -149,7 +150,6 @@
d->setWaitForMoreJobs( false );
}
-#ifndef QT_NO_FILEDIALOG
static QStringList get_file_name( QWidget * parent ) {
const QString certificateFilter = i18n("Certificates") + " (*.asc *.cer *.cert \
*.crt *.der *.pem *.gpg *.p7c *.p12 *.pfx *.pgp)"; const QString anyFilesFilter = \
i18n("Any files") + " (*)"; @@ -159,7 +159,12 @@
previousDir = group.readPathEntry( "last-open-file-directory", \
QDir::homePath() ); }
// ### use Kleo::FileDialog?
+#ifndef QT_NO_FILEDIALOG
const QStringList files = QFileDialog::getOpenFileNames( parent, i18n( "Select \
Certificate File" ), previousDir, certificateFilter + ";;" + anyFilesFilter ); +#else
+ QStringList files;
+ files << Kleo::FileDialog::getOpenFileName( parent, i18n( "Select Certificate \
File" ), previousDir, certificateFilter + ";;" + anyFilesFilter ); +#endif
if ( !files.empty() )
if ( const KSharedConfig::Ptr config = KGlobal::config() ) {
KConfigGroup group( config, "Import Certificate" );
@@ -167,14 +172,11 @@
}
return files;
}
-#endif // QT_NO_FILEDIALOG
bool ImportCertificateFromFileCommand::Private::ensureHaveFile()
{
-#ifndef QT_NO_FILEDIALOG
if ( files.empty() )
files = get_file_name( parentWidgetOrView() );
-#endif // QT_NO_FILEDIALOG
return !files.empty();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic