Commit 67d83907 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent f332603b
Pipeline #113769 passed with stage
in 47 seconds
......@@ -56,7 +56,7 @@ int main(int argc, char **argv)
{
createSymlinkForWindowDecorations();
QCoreApplication app(argc, argv);
app.setApplicationName(QLatin1String("kpackage-knshandler"));
app.setApplicationName(QStringLiteral("kpackage-knshandler"));
app.setApplicationVersion(knshandlerversion);
app.setQuitLockEnabled(false);
Q_ASSERT(app.arguments().count() == 2);
......@@ -93,9 +93,9 @@ int main(int argc, char **argv)
int linkid = 1;
if (url.hasQuery()) {
QUrlQuery query(url);
if (query.hasQueryItem(QLatin1String("linkid"))) {
if (query.hasQueryItem(QStringLiteral("linkid"))) {
bool ok;
linkid = query.queryItemValue(QLatin1String("linkid")).toInt(&ok);
linkid = query.queryItemValue(QStringLiteral("linkid")).toInt(&ok);
if (!ok) {
qWarning() << "linkid is not an integer" << url << pathParts;
return 1;
......@@ -144,13 +144,10 @@ int main(int argc, char **argv)
engine.fetchEntryById(entryid);
});
QObject::connect(&engine,
&KNSCore::Engine::signalErrorCode,
&engine,
[](const KNSCore::ErrorCode &errorCode, const QString &message, const QVariant &metadata) {
qWarning() << "kns error:" << errorCode << message << metadata;
QCoreApplication::exit(1);
});
QObject::connect(&engine, &KNSCore::Engine::signalErrorCode, &engine, [](KNSCore::ErrorCode errorCode, const QString &message, const QVariant &metadata) {
qWarning() << "kns error:" << errorCode << message << metadata;
QCoreApplication::exit(1);
});
QObject::connect(&engine,
&KNSCore::Engine::signalEntryEvent,
&engine,
......
......@@ -25,7 +25,7 @@ void showDialog()
QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Cancel | QDialogButtonBox::Ok, dialog.data());
// Useful to change the text because setting the text triggers setShortcut
box->button(QDialogButtonBox::Ok)->setText(QLatin1String("Send"));
box->button(QDialogButtonBox::Ok)->setText(QStringLiteral("Send"));
QObject::connect(box, &QDialogButtonBox::accepted, dialog.data(), &QDialog::accept);
QObject::connect(box, &QDialogButtonBox::rejected, dialog.data(), &QDialog::reject);
......
  • This seems to have caused https://bugs.kde.org/show_bug.cgi?id=448237.

  • The QLatin1String->QStringLiteral change seems innocent.

    The only interesting change I see is const KNSCore::ErrorCode &errorCode to KNSCore::ErrorCode errorCode. Can you check if changing that fixes it?

  • I might have been wrong. Reverting this doesn't fix it. I'm bisecting the kns framework right now.

  • OK, this is weird.

    Reverting this commit fixes the issue if I also go back to f815d27b in knewstuff.

    going back to f815d27bin knewstuff still fails if this commit is present.

  • The regression happened in f332603b

Supports Markdown
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