Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 71dfb8d2 authored by Laurent Montel's avatar Laurent Montel 😁

remove some clazy warning

parent 20f4249c
......@@ -73,12 +73,12 @@ QUrl HistoryAction::pop()
HistoryCollection::HistoryCollection(KActionCollection *ac, QObject *parent)
: QObject(parent)
, m_b(new HistoryAction(QIcon::fromTheme(QLatin1String( "go-previous" )), i18nc("Go to the last path viewed", "Back"), ac))
, m_f(new HistoryAction(QIcon::fromTheme(QLatin1String( "go-next" )), i18nc("Go to forward in the history of paths viewed", "Forward"), ac))
, m_b(new HistoryAction(QIcon::fromTheme(QStringLiteral( "go-previous" )), i18nc("Go to the last path viewed", "Back"), ac))
, m_f(new HistoryAction(QIcon::fromTheme(QStringLiteral( "go-next" )), i18nc("Go to forward in the history of paths viewed", "Forward"), ac))
, m_receiver(nullptr)
{
ac->addAction(QLatin1String( "go_back" ), m_b);
ac->addAction(QLatin1String( "go_forward" ), m_f);
ac->addAction(QStringLiteral( "go_back" ), m_b);
ac->addAction(QStringLiteral( "go_forward" ), m_f);
connect(m_b, &QAction::triggered, this, &HistoryCollection::pop);
connect(m_f, &QAction::triggered, this, &HistoryCollection::pop);
}
......
......@@ -37,9 +37,9 @@ int main(int argc, char *argv[])
KLocalizedString::setApplicationDomain("filelight");
Kdelibs4ConfigMigrator migrate(QLatin1String("filelight"));
migrate.setConfigFiles(QStringList() << QLatin1String("filelightrc"));
migrate.setUiFiles(QStringList() << QLatin1String("filelightui.rc"));
Kdelibs4ConfigMigrator migrate(QStringLiteral("filelight"));
migrate.setConfigFiles(QStringList() << QStringLiteral("filelightrc"));
migrate.setUiFiles(QStringList() << QStringLiteral("filelightui.rc"));
migrate.migrate();
using Filelight::MainWindow;
......@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
KAboutData::setApplicationData(about);
app.setOrganizationName(QStringLiteral("KDE"));
app.setWindowIcon(QIcon::fromTheme(QLatin1String(APP_NAME)));
app.setWindowIcon(QIcon::fromTheme(QStringLiteral(APP_NAME)));
QCommandLineParser options;
options.addHelpOption();
......
......@@ -350,7 +350,7 @@ void MainWindow::postInit()
//FIXME KXMLGUI is b0rked, it should allow us to set this
//BEFORE createGUI is called but it doesn't
stateChanged(QLatin1String("scan_failed"));
stateChanged(QStringLiteral("scan_failed"));
}
}
......@@ -469,7 +469,7 @@ bool MainWindow::start(const QUrl &url)
setUrl(url);
const QString s = i18n("Scanning: %1", prettyUrl());
stateChanged(QLatin1String("scan_started"));
stateChanged(QStringLiteral("scan_started"));
emit started(); //as a MainWindow, we have to do this
emit setWindowCaption(s);
statusBar()->showMessage(s);
......@@ -508,10 +508,10 @@ void MainWindow::folderScanCompleted(Folder *tree)
m_map->show();
m_map->create(tree);
stateChanged(QLatin1String("scan_complete"));
stateChanged(QStringLiteral("scan_complete"));
}
else {
stateChanged(QLatin1String("scan_failed"));
stateChanged(QStringLiteral("scan_failed"));
emit canceled(i18n("Scan failed: %1", prettyUrl()));
emit setWindowCaption(QString());
......
......@@ -83,7 +83,7 @@ ProgressBox::halt()
{
// canceled by stop button
m_timer.stop();
QTimer::singleShot(2000, this, SLOT(hide()));
QTimer::singleShot(2000, this, &QWidget::hide);
}
void
......
......@@ -202,7 +202,7 @@ void RadialMap::Widget::paintExplodedLabels(QPainter &paint) const
font.setPointSize(sizes[label->level]);
}
QFontMetrics fontMetrics(font);
const int minTextWidth = fontMetrics.width(QString::fromLatin1("M...")) + LABEL_TEXT_HMARGIN; // Fully elided string
const int minTextWidth = fontMetrics.width(QStringLiteral("M...")) + LABEL_TEXT_HMARGIN; // Fully elided string
const int fontHeight = fontMetrics.height() + LABEL_TEXT_VMARGIN; //used to ensure label texts don't overlap
const int lineSpacing = fontHeight / 4;
......
......@@ -290,32 +290,32 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
popup.setTitle(m_focus->file()->displayPath(m_tree));
if (isDir) {
openFileManager = popup.addAction(QIcon::fromTheme(QLatin1String("system-file-manager")), i18n("Open &File Manager Here"));
openFileManager = popup.addAction(QIcon::fromTheme(QStringLiteral("system-file-manager")), i18n("Open &File Manager Here"));
if (url.scheme() == QLatin1String("file")) {
openTerminal = popup.addAction(QIcon::fromTheme(QLatin1String( "utilities-terminal" )), i18n("Open &Terminal Here"));
openTerminal = popup.addAction(QIcon::fromTheme(QStringLiteral( "utilities-terminal" )), i18n("Open &Terminal Here"));
}
if (m_focus->file() != m_tree) {
popup.addSeparator();
centerMap = popup.addAction(QIcon::fromTheme(QLatin1String( "zoom-in" )), i18n("&Center Map Here"));
centerMap = popup.addAction(QIcon::fromTheme(QStringLiteral( "zoom-in" )), i18n("&Center Map Here"));
}
} else {
openFile = popup.addAction(QIcon::fromTheme(QLatin1String("document-open")), i18nc("Scan/open the path of the selected element", "&Open"));
openFile = popup.addAction(QIcon::fromTheme(QStringLiteral("document-open")), i18nc("Scan/open the path of the selected element", "&Open"));
}
popup.addSeparator();
copyClipboard = popup.addAction(QIcon::fromTheme(QLatin1String( "edit-copy" )), i18n("&Copy to clipboard"));
copyClipboard = popup.addAction(QIcon::fromTheme(QStringLiteral( "edit-copy" )), i18n("&Copy to clipboard"));
if (m_focus->file() != m_tree) {
popup.addSeparator();
deleteItem = popup.addAction(QIcon::fromTheme(QLatin1String( "edit-delete" )), i18n("&Delete"));
deleteItem = popup.addAction(QIcon::fromTheme(QStringLiteral( "edit-delete" )), i18n("&Delete"));
}
QAction* clicked = popup.exec(e->globalPos(), nullptr);
if (openFileManager && clicked == openFileManager) {
KRun::runUrl(url, QLatin1String("inode/directory"), this
KRun::runUrl(url, QStringLiteral("inode/directory"), this
#if KIO_VERSION >= QT_VERSION_CHECK(5, 31, 0)
, KRun::RunFlags()
#endif
......@@ -339,7 +339,7 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
: i18n("<qt><i>'%1'</i> will be <b>permanently</b> deleted.</qt>", url.toString());
const int userIntention = KMessageBox::warningContinueCancel(
this, message,
QString(), KGuiItem(i18n("&Delete"), QLatin1String("edit-delete")));
QString(), KGuiItem(i18n("&Delete"), QStringLiteral("edit-delete")));
if (userIntention == KMessageBox::Continue) {
KIO::Job *job = KIO::del(url);
......
......@@ -83,7 +83,7 @@ bool ScanManager::start(const QUrl &url)
Filelight::RemoteLister *remoteLister = new Filelight::RemoteLister(url, (QWidget*)parent(), this);
connect(remoteLister, &Filelight::RemoteLister::branchCompleted, this, &ScanManager::cacheTree, Qt::QueuedConnection);
remoteLister->setParent(this);
remoteLister->setObjectName(QLatin1String( "remote_lister" ));
remoteLister->setObjectName(QStringLiteral( "remote_lister" ));
remoteLister->openUrl(url);
return true;
}
......@@ -170,7 +170,7 @@ bool ScanManager::abort()
{
m_abort = true;
delete findChild<RemoteLister *>(QLatin1String( "remote_lister" ));
delete findChild<RemoteLister *>(QStringLiteral( "remote_lister" ));
return m_thread && m_thread->wait();
}
......
......@@ -82,8 +82,8 @@ SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent)
connect(minFontPitch, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &SettingsDialog::changeMinFontPitch);
m_addButton->setIcon(QIcon::fromTheme(QLatin1String("folder-open")));
m_removeButton->setIcon(QIcon::fromTheme(QLatin1String("list-remove")));
m_addButton->setIcon(QIcon::fromTheme(QStringLiteral("folder-open")));
m_removeButton->setIcon(QIcon::fromTheme(QStringLiteral("list-remove")));
}
......
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