Commit 6ee12036 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Less auto-casting from coonst char* to QString

GIT_SILENT
parent 56cb99be
Pipeline #182462 passed with stage
in 1 minute and 27 seconds
......@@ -121,13 +121,13 @@ namespace Oxygen
// needed to tell kwin to reload when running from external kcmshell
{
QDBusMessage message = QDBusMessage::createSignal("/KWin", "org.kde.KWin", "reloadConfig");
QDBusMessage message = QDBusMessage::createSignal(QStringLiteral("/KWin"), QStringLiteral("org.kde.KWin"), QStringLiteral("reloadConfig"));
QDBusConnection::sessionBus().send(message);
}
// needed for oxygen style to reload shadows
{
QDBusMessage message( QDBusMessage::createSignal("/OxygenDecoration", "org.kde.Oxygen.Style", "reparseConfiguration") );
QDBusMessage message( QDBusMessage::createSignal(QStringLiteral("/OxygenDecoration"), QStringLiteral("org.kde.Oxygen.Style"), QStringLiteral("reparseConfiguration")) );
QDBusConnection::sessionBus().send(message);
}
......
......@@ -20,7 +20,7 @@ namespace Oxygen
//______________________________________________________________________________
DecoHelper::DecoHelper():
Helper(KSharedConfig::openConfig("oxygenrc"))
Helper(KSharedConfig::openConfig(QStringLiteral("oxygenrc")))
{}
//______________________________________________________________________________
......
......@@ -74,14 +74,21 @@ namespace Oxygen
//_______________________________________________________________________
QString ExceptionList::exceptionGroupName( int index )
{ return QString( "Windeco Exception %1" ).arg( index ); }
{ return QStringLiteral( "Windeco Exception %1" ).arg( index ); }
//______________________________________________________________
void ExceptionList::writeConfig( KCoreConfigSkeleton* skeleton, KConfig* config, const QString& groupName )
{
// list of items to be written
static const QStringList keys = { "Enabled", "ExceptionPattern", "ExceptionType", "HideTitleBar", "Mask", "BorderSize"};
static const QStringList keys = {
QStringLiteral("Enabled"),
QStringLiteral("ExceptionPattern"),
QStringLiteral("ExceptionType"),
QStringLiteral("HideTitleBar"),
QStringLiteral("Mask"),
QStringLiteral("BorderSize")
};
// write all items
for ( const auto &key : keys )
......
......@@ -106,7 +106,7 @@ namespace Oxygen
// reparent
xcb_reparent_window( connection, winId(), current, 0, 0 );
setWindowTitle( "Oxygen::SizeGrip" );
setWindowTitle( QStringLiteral("Oxygen::SizeGrip") );
} else {
......@@ -236,7 +236,7 @@ namespace Oxygen
{
// create atom if not found
const QString atomName( "_NET_WM_MOVERESIZE" );
const QString atomName = QStringLiteral("_NET_WM_MOVERESIZE");
xcb_intern_atom_cookie_t cookie( xcb_intern_atom( connection, false, atomName.size(), qPrintable( atomName ) ) );
ScopedPointer<xcb_intern_atom_reply_t> reply( xcb_intern_atom_reply( connection, cookie, nullptr ) );
m_moveResizeAtom = reply ? reply->atom:0;
......
......@@ -65,7 +65,7 @@ namespace Oxygen
QString type( _eventTypes[event->type()] );
if( !type.isEmpty() )
{
std::cout << "Oxygen::WidgetExplorer::eventFilter - widget: " << object << " (" << qPrintable(object->metaObject()->className()) << ")";
std::cout << "Oxygen::WidgetExplorer::eventFilter - widget: " << object << " (" << object->metaObject()->className() << ")";
std::cout << " type: " << qPrintable(type) << std::endl;
}
}
......
......@@ -28,7 +28,7 @@ namespace Oxygen
QCommandLineParser commandLine;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCommandLineOption enableHighDpi( "highdpi", "Enable High DPI pixmaps" );
QCommandLineOption enableHighDpi( QStringLiteral("highdpi"), QStringLiteral("Enable High DPI pixmaps") );
commandLine.addOption( enableHighDpi );
#endif
commandLine.process( app );
......
......@@ -55,25 +55,25 @@ namespace Oxygen
posMsg = new KMessageWidget(QStringLiteral("A positive message"), ui.msgFrame);
posMsg->setMessageType(KMessageWidget::Positive);
posMsg->setWordWrap(true);
posMsg->setIcon(QIcon::fromTheme("dialog-positive"));
posMsg->setIcon(QIcon::fromTheme(QStringLiteral("dialog-positive")));
ui.verticalLayout_5->addWidget(posMsg);
infoMsg = new KMessageWidget(QStringLiteral("An information message"), ui.msgFrame);
infoMsg->setMessageType(KMessageWidget::Information);
infoMsg->setWordWrap(true);
infoMsg->setIcon(QIcon::fromTheme("dialog-information"));
infoMsg->setIcon(QIcon::fromTheme(QStringLiteral("dialog-information")));
ui.verticalLayout_5->addWidget(infoMsg);
warnMsg = new KMessageWidget(QStringLiteral("A warning message"), ui.msgFrame);
warnMsg->setMessageType(KMessageWidget::Warning);
warnMsg->setWordWrap(true);
warnMsg->setIcon(QIcon::fromTheme("dialog-warning"));
warnMsg->setIcon(QIcon::fromTheme(QStringLiteral("dialog-warning")));
ui.verticalLayout_5->addWidget(warnMsg);
errMsg = new KMessageWidget(QStringLiteral("An error message"), ui.msgFrame);
errMsg->setMessageType(KMessageWidget::Error);
errMsg->setWordWrap(true);
errMsg->setIcon(QIcon::fromTheme("dialog-error"));
errMsg->setIcon(QIcon::fromTheme(QStringLiteral("dialog-error")));
ui.verticalLayout_5->addWidget(errMsg);
ui.verticalLayout_5->addStretch();
......
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