Changeset View
Changeset View
Standalone View
Standalone View
keysmanager.cpp
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | |||||
101 | #include <QList> | 101 | #include <QList> | ||
102 | #include <QMenu> | 102 | #include <QMenu> | ||
103 | #include <QMetaObject> | 103 | #include <QMetaObject> | ||
104 | #include <QNetworkConfigurationManager> | 104 | #include <QNetworkConfigurationManager> | ||
105 | #include <QPainter> | 105 | #include <QPainter> | ||
106 | #include <QPrintDialog> | 106 | #include <QPrintDialog> | ||
107 | #include <QPrinter> | 107 | #include <QPrinter> | ||
108 | #include <QProcess> | 108 | #include <QProcess> | ||
109 | #include <QRegularExpression> | ||||
109 | #include <QStatusBar> | 110 | #include <QStatusBar> | ||
110 | #include <QUrl> | 111 | #include <QUrl> | ||
111 | #include <QWidget> | 112 | #include <QWidget> | ||
112 | #include <QWidgetAction> | 113 | #include <QWidgetAction> | ||
113 | 114 | | |||
114 | using namespace KgpgCore; | 115 | using namespace KgpgCore; | ||
115 | 116 | | |||
116 | KeysManager::KeysManager(QWidget *parent) | 117 | KeysManager::KeysManager(QWidget *parent) | ||
▲ Show 20 Lines • Show All 1317 Lines • ▼ Show 20 Line(s) | 1416 | { | |||
1434 | QStringList klist; | 1435 | QStringList klist; | ||
1435 | for (const auto k : ndlist) | 1436 | for (const auto k : ndlist) | ||
1436 | klist << k->getId(); | 1437 | klist << k->getId(); | ||
1437 | 1438 | | |||
1438 | sname.append(QLatin1String( ".asc" )); | 1439 | sname.append(QLatin1String( ".asc" )); | ||
1439 | sname.prepend(QDir::homePath() + QLatin1Char( '/' )); | 1440 | sname.prepend(QDir::homePath() + QLatin1Char( '/' )); | ||
1440 | 1441 | | |||
1441 | QStringList serverList(KGpgSettings::keyServers()); | 1442 | QStringList serverList(KGpgSettings::keyServers()); | ||
1442 | serverList.replaceInStrings(QRegExp(QLatin1String(" .*")), QString()); // Remove kde 3.5 (Default) tag. | 1443 | serverList.replaceInStrings(QRegularExpression(QStringLiteral(" .*")), QString()); // Remove kde 3.5 (Default) tag. | ||
1443 | if (!serverList.isEmpty()) { | 1444 | if (!serverList.isEmpty()) { | ||
1444 | QString defaultServer = serverList.takeFirst(); | 1445 | QString defaultServer = serverList.takeFirst(); | ||
1445 | std::sort(serverList.begin(), serverList.end()); | 1446 | std::sort(serverList.begin(), serverList.end()); | ||
1446 | serverList.prepend(defaultServer); | 1447 | serverList.prepend(defaultServer); | ||
1447 | } | 1448 | } | ||
1448 | 1449 | | |||
1449 | QPointer<KeyExport> page = new KeyExport(this, serverList); | 1450 | QPointer<KeyExport> page = new KeyExport(this, serverList); | ||
1450 | 1451 | | |||
▲ Show 20 Lines • Show All 1406 Lines • Show Last 20 Lines |