Commit 8e8ad8b4 authored by Laurent Montel's avatar Laurent Montel 😁

Make it compiles with strict definition.

parent d41ad469
......@@ -49,6 +49,12 @@ find_package(KF5 5.24 REQUIRED
Crash
)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_USE_QSTRINGBUILDER)
add_definitions(-DQT_NO_CAST_FROM_ASCII)
add_definitions(-DQT_NO_CAST_TO_ASCII)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_subdirectory( doc )
add_subdirectory( icons )
add_subdirectory( src )
......
......@@ -92,7 +92,7 @@ KWalletEditor::KWalletEditor(QWidget *parent, const QString &name)
QVBoxLayout *box = new QVBoxLayout(_entryListFrame);
box->setMargin(0);
_entryList = new KWalletEntryList(_entryListFrame, "Wallet Entry List");
_entryList = new KWalletEntryList(_entryListFrame, QStringLiteral("Wallet Entry List"));
_entryList->setContextMenuPolicy(Qt::CustomContextMenu);
_searchLine = new KTreeWidgetSearchLine(_entryListFrame, _entryList);
_searchLine->setPlaceholderText(i18n("Search"));
......@@ -544,7 +544,7 @@ void KWalletEditor::entrySelectionChanged(QTreeWidgetItem *item)
_contextMenu->addSeparator();
_contextMenu->addAction(_copyPassAction);
if (_alwaysShowContents) {
QTimer::singleShot(0, this, SLOT(showPasswordContents()));
QTimer::singleShot(0, this, &KWalletEditor::showPasswordContents);
}
} else if (ci->entryType() == KWallet::Wallet::Map) {
_entryStack->setCurrentIndex(2);
......
......@@ -420,7 +420,7 @@ void KWalletManager::closeAllWallets()
void KWalletManager::exportWallets()
{
const QString path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/kwalletd/";
const QString path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kwalletd/");
const QDir dir(path);
dir.mkpath(path);
......@@ -450,7 +450,7 @@ void KWalletManager::exportWallets()
void KWalletManager::importWallets()
{
const QString source = QFileDialog::getOpenFileName(this, i18n("Select file"));
const QString destinationDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/kwalletd/";
const QString destinationDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/kwalletd/");
QDir().mkpath(destinationDir);
if (source.isEmpty()) {
......
......@@ -38,7 +38,7 @@ static QString toHex(It it, It end)
QString text;
QTextStream ts(&text);
ts << hex << qSetFieldWidth(2) << qSetPadChar('0');
ts << hex << qSetFieldWidth(2) << qSetPadChar(QLatin1Char('0'));
while (it < end) {
const auto sEnd = qMin(it + hexStride, end);
......@@ -56,7 +56,7 @@ static QString toText(It begin, It end)
QString text = QString::fromLatin1(begin, end - begin);
for (auto &ch: text)
if (!ch.isPrint()) ch = '.';
if (!ch.isPrint()) ch = QLatin1Char('.');
return text;
}
......
......@@ -39,7 +39,7 @@ WalletControlWidget::WalletControlWidget(QWidget *parent, const QString &walletN
setupUi(this);
onSetupWidget();
QTimer::singleShot(1, this, SLOT(onSetupWidget()));
QTimer::singleShot(1, this, &WalletControlWidget::onSetupWidget);
}
bool WalletControlWidget::openWallet()
......
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