Commit f51036f4 authored by Laurent Montel's avatar Laurent Montel 😁

Use QStringLiteral, convert kDebug to qDebug

parent c03ed36e
......@@ -20,7 +20,7 @@
#include "componentchooserfilemanager.h"
#include <kbuildsycocaprogressdialog.h>
#include <kdebug.h>
#include <QDebug>
#include <kprocess.h>
#include <kmimetypetrader.h>
#include <kopenwithdialog.h>
......@@ -89,7 +89,7 @@ void CfgFileManager::save(KConfig *)
}
}
kDebug() << storageId;
qDebug() << storageId;
if (!storageId.isEmpty()) {
// This is taken from filetypes/mimetypedata.cpp
KSharedConfig::Ptr profile = KSharedConfig::openConfig(QStringLiteral("mimeapps.list"), KConfig::NoGlobals, QStandardPaths::GenericConfigLocation);
......
......@@ -41,7 +41,7 @@
#include <QGridLayout>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <kdebug.h>
#include <QDebug>
#include <klocale.h>
#include <kprocess.h>
#include <kstandarddirs.h>
......@@ -164,12 +164,12 @@ void Dtime::findNTPutility(){
foreach(const QString &possible_ntputility, QStringList() << "ntpdate" << "rdate" ) {
if( !((ntpUtility = KStandardDirs::findExe(possible_ntputility, path)).isEmpty()) ) {
kDebug() << "ntpUtility = " << ntpUtility;
qDebug() << "ntpUtility = " << ntpUtility;
return;
}
}
kDebug() << "ntpUtility not found!";
qDebug() << "ntpUtility not found!";
}
void Dtime::set_time()
......
......@@ -252,8 +252,8 @@ void DesktopPathConfig::save()
// !!!
qCDebug(KCM_DESKTOPPATH) << "desktopURL=" << desktopURL;
QString urlDesktop = urDesktop->url().toLocalFile();
if ( !urlDesktop.endsWith('/'))
urlDesktop+='/';
if ( !urlDesktop.endsWith(QLatin1Char('/')))
urlDesktop+=QLatin1Char('/');
if ( desktopURL.isParentOf( autostartURL ) )
{
......
......@@ -166,7 +166,7 @@ void KCMDesktopTheme::applyPlasmaTheme(QQuickItem *item, const QString &themeNam
}
}
Q_INVOKABLE int KCMDesktopTheme::indexOf(const QString &themeName) const
int KCMDesktopTheme::indexOf(const QString &themeName) const
{
for (int i = 0; i < m_model->rowCount(); ++i) {
if (m_model->data(m_model->index(i, 0), PluginNameRole).toString() == themeName) {
......@@ -197,9 +197,9 @@ void KCMDesktopTheme::load()
m_model->clear();
Q_FOREACH (const QString &theme, themes) {
int themeSepIndex = theme.lastIndexOf('/', -1);
int themeSepIndex = theme.lastIndexOf(QLatin1Char('/'), -1);
const QString themeRoot = theme.left(themeSepIndex);
int themeNameSepIndex = themeRoot.lastIndexOf('/', -1);
int themeNameSepIndex = themeRoot.lastIndexOf(QLatin1Char('/'), -1);
const QString packageName = themeRoot.right(themeRoot.length() - themeNameSepIndex - 1);
KDesktopFile df(theme);
......
......@@ -28,7 +28,6 @@
#include <KGlobal>
#include <KMessageBox>
#include <KDebug>
#include <QIcon>
#include <KAboutData>
#include <KStandardDirs>
......@@ -206,7 +205,7 @@ void EmoticonList::updateButton()
void EmoticonList::selectTheme()
{
kDebug() << "current_item: " << themeList->currentItem();
qDebug() << "current_item: " << themeList->currentItem();
updateButton();
if (!themeList->currentItem()) {
......@@ -228,7 +227,7 @@ void EmoticonList::selectTheme()
if (it.value().size()) {
text = it.value().at(0);
for (int i = 1; i < it.value().size(); i++) {
text += ' ' + it.value().at(i);
text += QLatin1Char(' ') + it.value().at(i);
}
}
......@@ -275,7 +274,7 @@ void EmoticonList::btRemoveEmoticonClicked()
QListWidgetItem *itm = emoList->currentItem();
KEmoticonsTheme theme = emoMap.value(themeList->currentItem()->text());
const QString fPath = theme.emoticonsMap().key(itm->text().split(' '));
const QString fPath = theme.emoticonsMap().key(itm->text().split(QLatin1Char(' ')));
if (theme.removeEmoticon(itm->text())) {
int ret = KMessageBox::questionYesNo(this, i18n("Do you want to remove %1 too?", fPath), i18n("Delete emoticon"));
if (ret == KMessageBox::Yes) {
......@@ -334,15 +333,15 @@ void EmoticonList::editEmoticon()
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f);
if (emo.isNull())
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + ".mng");
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + QStringLiteral(".mng"));
if (emo.isNull())
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + ".png");
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + QStringLiteral(".png"));
if (emo.isNull())
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + ".gif");
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + QStringLiteral(".gif"));
if (emo.isNull())
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + ".jpg");
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + QStringLiteral(".jpg"));
if (emo.isNull())
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + ".jpeg");
emo = dir->findResource("emoticons", themeList->currentItem()->text() + QDir::separator() + f + QStringLiteral(".jpeg"));
if (emo.isNull()) {
delete dlg;
return;
......@@ -433,10 +432,10 @@ void EmoticonList::getNewStuff()
for (int i = 0; i < entries.size(); i ++) {
if (entries.at(i).status() == KNS3::Entry::Installed
&& !entries.at(i).installedFiles().isEmpty()) {
QString name = entries.at(i).installedFiles().at(0).section('/', -2, -2);
QString name = entries.at(i).installedFiles().at(0).section(QLatin1Char('/'), -2, -2);
loadTheme(name);
} else if (entries.at(i).status() == KNS3::Entry::Deleted) {
QString name = entries.at(i).uninstalledFiles().at(0).section('/', -2, -2);
QString name = entries.at(i).uninstalledFiles().at(0).section(QLatin1Char('/'), -2, -2);
QList<QListWidgetItem*> ls = themeList->findItems(name, Qt::MatchExactly);
if (ls.size()) {
delete ls.at(0);
......@@ -480,7 +479,7 @@ bool EmoticonList::canEditTheme()
}
KEmoticonsTheme theme = emoMap.value(themeList->currentItem()->text());
QFileInfo inf(theme.themePath() + '/' + theme.fileName());
QFileInfo inf(theme.themePath() + QLatin1Char('/') + theme.fileName());
return inf.isWritable();
}
......
......@@ -33,12 +33,12 @@
#include <QDir>
#include <QX11Info>
#include <QByteArray>
#include <QDebug>
#include <KLocalizedString>
#include <kde_file.h>
#include <KGlobal>
#include <KStandardDirs>
#include <KDebug>
#include <fontconfig/fontconfig.h>
......@@ -230,7 +230,7 @@ KXftConfig::KXftConfig()
: m_doc("fontconfig")
, m_file(getConfigFile())
{
kDebug(1208) << "Using fontconfig file:" << m_file;
qDebug() << "Using fontconfig file:" << m_file;
reset();
}
......
......@@ -63,8 +63,8 @@ KCMFormats::~KCMFormats()
bool countryLessThan(const QLocale & c1, const QLocale & c2)
{
// Ensure that the "Default (C)" locale always appears at the top
if (c1.name()=="C" && c2.name()!="C") return true;
if (c2.name()=="C") return false;
if (c1.name()==QLatin1String("C") && c2.name()!=QLatin1String("C")) return true;
if (c2.name()==QLatin1String("C")) return false;
const QString ncn1 = !c1.nativeCountryName().isEmpty() ? c1.nativeCountryName() : QLocale::countryToString(c1.country());
const QString ncn2 = !c2.nativeCountryName().isEmpty() ? c2.nativeCountryName() : QLocale::countryToString(c2.country());
......@@ -121,14 +121,14 @@ void KCMFormats::addLocaleToCombo(QComboBox *combo, const QLocale &locale)
// "it_IT")
// TODO: Properly handle scripts (@foo)
QString cvalue = locale.name();
if (!cvalue.contains('.') && cvalue != QStringLiteral("C")) {
if (!cvalue.contains(QLatin1Char('.')) && cvalue != QStringLiteral("C")) {
// explicitly add the encoding,
// otherwise Qt doesn't accept dead keys and garbles the output as well
cvalue.append(QLatin1Char('.') + QTextCodec::codecForLocale()->name());
}
QString flagcode;
const QStringList split = locale.name().split('_');
const QStringList split = locale.name().split(QLatin1Char('_'));
if (split.count() > 1) {
flagcode = split[1].toLower();
}
......
......@@ -22,7 +22,7 @@
#include "joydevice.h"
#include <klocale.h>
#include <kdebug.h>
#include <QDebug>
#include <KLocalizedString>
#include <sys/types.h>
......@@ -301,7 +301,7 @@ void JoyDevice::calcPrecision()
for (i = 0; i < axes; i++)
{
corr[i].prec = amax[i] - amin[i];
kDebug() << "Precision for axis: " << i << ": " << corr[i].prec;
qDebug() << "Precision for axis: " << i << ": " << corr[i].prec;
}
}
......@@ -395,9 +395,9 @@ void JoyDevice::calcCorrection(int axis, int *min, int *center, int *max)
corr[axis].coef[2] = (int)rint(c*16384.0);
corr[axis].coef[3] = (int)rint(d*16384.0);
kDebug() << "min min: " << min[0] << " max: " << min[1] ;
kDebug() << "max min: " << max[0] << " max: " << max[1] ;
kDebug() << "Correction values for axis: " << axis << ": "
qDebug() << "min min: " << min[0] << " max: " << min[1] ;
qDebug() << "max min: " << max[0] << " max: " << max[1] ;
qDebug() << "Correction values for axis: " << axis << ": "
<< corr[axis].coef[0] << ", "
<< corr[axis].coef[1] << ", "
<< corr[axis].coef[2] << ", "
......
......@@ -397,7 +397,7 @@ QWidget *KKeySequenceWidgetDelegate::createEditor(QWidget *parent, const QStyleO
// QString shortcut = index.model()->data(index, Qt::EditRole).toString();
// kkeysequencewidget->setKeySequence(QKeySequence(shortcut));
// kkeysequencewidget->captureKeySequence();
//// kDebug() << "set editor data";
// qDebug() << "set editor data";
//}
void KKeySequenceWidgetDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
......@@ -515,7 +515,7 @@ void XkbOptionsTreeModel::gotoGroup(const QString& groupName, QTreeView* view) {
view->setFocus(Qt::OtherFocusReason);
}
// else {
// kDebug() << "can't scroll to group" << group;
// qDebug() << "can't scroll to group" << group;
// }
}
......@@ -98,7 +98,7 @@ void LayoutTrayIcon::layoutChanged()
return;
// QString shortText = Flags::getShortText(layoutUnit, *keyboardConfig);
// kDebug() << "systray: LayoutChanged" << layoutUnit.toString() << shortText;
// qDebug() << "systray: LayoutChanged" << layoutUnit.toString() << shortText;
QString longText = Flags::getLongText(layoutUnit, rules);
m_notifierItem->setToolTipSubTitle(longText);
......
......@@ -272,7 +272,7 @@ bool X11Helper::getGroupNames(Display* display, XkbConfig* xkbConfig, FetchType
QStringList names;
for(char* p=prop_data; p-prop_data < (long)nitems && p != NULL; p += strlen(p)+1) {
names.append( p );
// kDebug() << " " << p;
// qDebug() << " " << p;
}
if( names.count() < 4 ) { //{ rules, model, layouts, variants, options }
......@@ -343,7 +343,7 @@ void XEventNotifier::stop()
bool XEventNotifier::isXkbEvent(xcb_generic_event_t* event)
{
// kDebug() << "event response type:" << (event->response_type & ~0x80) << xkbOpcode << ((event->response_type & ~0x80) == xkbOpcode + XkbEventCode);
// qDebug() << "event response type:" << (event->response_type & ~0x80) << xkbOpcode << ((event->response_type & ~0x80) == xkbOpcode + XkbEventCode);
return (event->response_type & ~0x80) == xkbOpcode + XkbEventCode;
}
......@@ -356,11 +356,11 @@ bool XEventNotifier::processXkbEvents(xcb_generic_event_t* event)
{
_xkb_event *xkbevt = reinterpret_cast<_xkb_event *>(event);
if( XEventNotifier::isGroupSwitchEvent(xkbevt) ) {
// kDebug() << "group switch event";
// qDebug() << "group switch event";
emit(layoutChanged());
}
else if( XEventNotifier::isLayoutSwitchEvent(xkbevt) ) {
// kDebug() << "layout switch event";
// qDebug() << "layout switch event";
emit(layoutMapChanged());
}
return true;
......@@ -368,7 +368,7 @@ bool XEventNotifier::processXkbEvents(xcb_generic_event_t* event)
bool XEventNotifier::nativeEventFilter(const QByteArray &eventType, void *message, long *)
{
// kDebug() << "event type:" << eventType;
// qDebug() << "event type:" << eventType;
if (eventType == "xcb_generic_event_t") {
xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message);
if( isXkbEvent(ev) ) {
......
......@@ -141,8 +141,8 @@ void KCMKNotify::load()
foreach (const QString &fullPath, fullpaths )
{
int slash = fullPath.lastIndexOf( '/' );
int dot = fullPath.lastIndexOf( '.' ) - 1;
int slash = fullPath.lastIndexOf( QLatin1Char('/') );
int dot = fullPath.lastIndexOf( QLatin1Char('.') ) - 1;
QString appname = slash < 0 ? QString() : fullPath.mid( slash + 1, dot - slash);
if ( !appname.isEmpty() )
{
......
......@@ -63,10 +63,10 @@ QList<Plasma::Package> KCMSplashScreen::availablePackages(const QString &compone
{
QList<Plasma::Package> packages;
QStringList paths;
QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
const QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
for (const QString &path : dataPaths) {
QDir dir(path + "/plasma/look-and-feel");
QDir dir(path + QStringLiteral("/plasma/look-and-feel"));
paths << dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot);
}
......
......@@ -33,29 +33,29 @@
#include <KPluginFactory>
K_PLUGIN_FACTORY(LaunchFactory,
registerPlugin<LaunchConfig>();
)
registerPlugin<LaunchConfig>();
)
static const int s_startupDefaultTimeout = 5;
LaunchConfig::LaunchConfig(QWidget * parent, const QVariantList &)
: KCModule(parent)
: KCModule(parent)
{
QVBoxLayout* Form1Layout = new QVBoxLayout( this );
Form1Layout->setMargin( 0 );
setQuickHelp( i18n ( "<h1>Launch Feedback</h1>"
" You can configure the application-launch feedback here." ) );
" You can configure the application-launch feedback here." ) );
QGroupBox* GroupBox1 = new QGroupBox(i18n( "Bus&y Cursor" ));
GroupBox1->setWhatsThis( i18n(
"<h1>Busy Cursor</h1>\n"
"KDE offers a busy cursor for application startup notification.\n"
"To enable the busy cursor, select one kind of visual feedback\n"
"from the combobox.\n"
"It may occur, that some applications are not aware of this startup\n"
"notification. In this case, the cursor stops blinking after the time\n"
"given in the section 'Startup indication timeout'"));
"<h1>Busy Cursor</h1>\n"
"KDE offers a busy cursor for application startup notification.\n"
"To enable the busy cursor, select one kind of visual feedback\n"
"from the combobox.\n"
"It may occur, that some applications are not aware of this startup\n"
"notification. In this case, the cursor stops blinking after the time\n"
"given in the section 'Startup indication timeout'"));
QGridLayout* GroupBox1Layout = new QGridLayout();
GroupBox1->setLayout( GroupBox1Layout );
......@@ -86,12 +86,12 @@ LaunchConfig::LaunchConfig(QWidget * parent, const QVariantList &)
QGroupBox* GroupBox2 = new QGroupBox( i18n( "Taskbar &Notification" ) );
GroupBox2->setWhatsThis( i18n("<H1>Taskbar Notification</H1>\n"
"You can enable a second method of startup notification which is\n"
"used by the taskbar where a button with a rotating hourglass appears,\n"
"symbolizing that your started application is loading.\n"
"It may occur, that some applications are not aware of this startup\n"
"notification. In this case, the button disappears after the time\n"
"given in the section 'Startup indication timeout'"));
"You can enable a second method of startup notification which is\n"
"used by the taskbar where a button with a rotating hourglass appears,\n"
"symbolizing that your started application is loading.\n"
"It may occur, that some applications are not aware of this startup\n"
"notification. In this case, the button disappears after the time\n"
"given in the section 'Startup indication timeout'"));
QGridLayout* GroupBox2Layout = new QGridLayout();
GroupBox2->setLayout( GroupBox2Layout );
......@@ -123,140 +123,140 @@ LaunchConfig::~LaunchConfig()
{
}
void
void
LaunchConfig::slotBusyCursor(int i)
{
lbl_cursorTimeout->setEnabled( i != 0 );
sb_cursorTimeout->setEnabled( i != 0 );
}
void
void
LaunchConfig::slotTaskbarButton(bool b)
{
lbl_taskbarTimeout->setEnabled( b );
sb_taskbarTimeout->setEnabled( b );
}
void
void
LaunchConfig::load()
{
KConfig conf(QStringLiteral("klaunchrc"), KConfig::NoGlobals);
KConfigGroup c = conf.group("FeedbackStyle");
KConfig conf(QStringLiteral("klaunchrc"), KConfig::NoGlobals);
KConfigGroup c = conf.group("FeedbackStyle");
bool busyCursor =
c.readEntry("BusyCursor", (bool)(Default & BusyCursor));
bool busyCursor =
c.readEntry("BusyCursor", (bool)(Default & BusyCursor));
bool taskbarButton =
c.readEntry("TaskbarButton", (bool)(Default & TaskbarButton));
bool taskbarButton =
c.readEntry("TaskbarButton", (bool)(Default & TaskbarButton));
cb_taskbarButton->setChecked(taskbarButton);
cb_taskbarButton->setChecked(taskbarButton);
c= conf.group( "BusyCursorSettings" );
sb_cursorTimeout->setValue( c.readEntry( "Timeout", s_startupDefaultTimeout ));
bool busyBlinking =c.readEntry("Blinking", false);
bool busyBouncing =c.readEntry("Bouncing", true);
if ( !busyCursor )
cb_busyCursor->setCurrentIndex(0);
else if ( busyBlinking )
cb_busyCursor->setCurrentIndex(2);
else if ( busyBouncing )
cb_busyCursor->setCurrentIndex(3);
else
cb_busyCursor->setCurrentIndex(1);
c= conf.group( "BusyCursorSettings" );
sb_cursorTimeout->setValue( c.readEntry( "Timeout", s_startupDefaultTimeout ));
bool busyBlinking =c.readEntry("Blinking", false);
bool busyBouncing =c.readEntry("Bouncing", true);
if ( !busyCursor )
cb_busyCursor->setCurrentIndex(0);
else if ( busyBlinking )
cb_busyCursor->setCurrentIndex(2);
else if ( busyBouncing )
cb_busyCursor->setCurrentIndex(3);
else
cb_busyCursor->setCurrentIndex(1);
c= conf.group( "TaskbarButtonSettings" );
sb_taskbarTimeout->setValue( c.readEntry( "Timeout", s_startupDefaultTimeout ));
c= conf.group( "TaskbarButtonSettings" );
sb_taskbarTimeout->setValue( c.readEntry( "Timeout", s_startupDefaultTimeout ));
slotBusyCursor( cb_busyCursor->currentIndex() );
slotTaskbarButton( taskbarButton );
slotBusyCursor( cb_busyCursor->currentIndex() );
slotTaskbarButton( taskbarButton );
emit changed( false );
emit changed( false );
}
void
void
LaunchConfig::save()
{
KConfig conf(QStringLiteral("klaunchrc"), KConfig::NoGlobals);
KConfigGroup c = conf.group("FeedbackStyle");
KConfig conf(QStringLiteral("klaunchrc"), KConfig::NoGlobals);
KConfigGroup c = conf.group("FeedbackStyle");
c.writeEntry("BusyCursor", cb_busyCursor->currentIndex() != 0);
c.writeEntry("TaskbarButton", cb_taskbarButton->isChecked());
c.writeEntry("BusyCursor", cb_busyCursor->currentIndex() != 0);
c.writeEntry("TaskbarButton", cb_taskbarButton->isChecked());
c = conf.group("BusyCursorSettings");
c.writeEntry( "Timeout", sb_cursorTimeout->value());
c.writeEntry("Blinking", cb_busyCursor->currentIndex() == 2);
c.writeEntry("Bouncing", cb_busyCursor->currentIndex() == 3);
c = conf.group("BusyCursorSettings");
c.writeEntry( "Timeout", sb_cursorTimeout->value());
c.writeEntry("Blinking", cb_busyCursor->currentIndex() == 2);
c.writeEntry("Bouncing", cb_busyCursor->currentIndex() == 3);
c = conf.group("TaskbarButtonSettings");
c.writeEntry( "Timeout", sb_taskbarTimeout->value());
c = conf.group("TaskbarButtonSettings");
c.writeEntry( "Timeout", sb_taskbarTimeout->value());
c.sync();
c.sync();
emit changed( false );
emit changed( false );
org::kde::kwin::Effects kwin(QStringLiteral("org.kde.KWin"), QStringLiteral("/Effects"), QDBusConnection::sessionBus());
kwin.reconfigureEffect(QStringLiteral("startupfeedback"));
org::kde::kwin::Effects kwin(QStringLiteral("org.kde.KWin"), QStringLiteral("/Effects"), QDBusConnection::sessionBus());
kwin.reconfigureEffect(QStringLiteral("startupfeedback"));
}
void
void
LaunchConfig::defaults()
{
cb_busyCursor->setCurrentIndex(3); // bouncing cursor
cb_taskbarButton->setChecked( (bool)(Default & TaskbarButton) );
cb_busyCursor->setCurrentIndex(3); // bouncing cursor
cb_taskbarButton->setChecked( (bool)(Default & TaskbarButton) );
sb_cursorTimeout->setValue( s_startupDefaultTimeout );
sb_taskbarTimeout->setValue( s_startupDefaultTimeout );
sb_cursorTimeout->setValue( s_startupDefaultTimeout );
sb_taskbarTimeout->setValue( s_startupDefaultTimeout );
slotBusyCursor(3);
slotTaskbarButton( (bool)(Default & TaskbarButton) );
slotBusyCursor(3);
slotTaskbarButton( (bool)(Default & TaskbarButton) );
checkChanged();
checkChanged();
}
void
void
LaunchConfig::checkChanged()
{
KConfig conf(QStringLiteral("klaunchrc"), KConfig::NoGlobals);
KConfigGroup c = conf.group("FeedbackStyle");
KConfig conf(QStringLiteral("klaunchrc"), KConfig::NoGlobals);
KConfigGroup c = conf.group("FeedbackStyle");
bool savedBusyCursor =
c.readEntry("BusyCursor", (bool)(Default & BusyCursor));
bool savedBusyCursor =
c.readEntry("BusyCursor", (bool)(Default & BusyCursor));
bool savedTaskbarButton =
c.readEntry("TaskbarButton", (bool)(Default & TaskbarButton));
bool savedTaskbarButton =
c.readEntry("TaskbarButton", (bool)(Default & TaskbarButton));
c = conf.group("BusyCursorSettings");
unsigned int savedCursorTimeout = c.readEntry( "Timeout", s_startupDefaultTimeout );
bool savedBusyBlinking =c.readEntry("Blinking", false);
bool savedBusyBouncing =c.readEntry("Bouncing", true);
c = conf.group("BusyCursorSettings");
unsigned int savedCursorTimeout = c.readEntry( "Timeout", s_startupDefaultTimeout );
bool savedBusyBlinking =c.readEntry("Blinking", false);
bool savedBusyBouncing =c.readEntry("Bouncing", true);
c = conf.group("TaskbarButtonSettings");
unsigned int savedTaskbarTimeout = c.readEntry( "Timeout", s_startupDefaultTimeout );
c = conf.group("TaskbarButtonSettings");
unsigned int savedTaskbarTimeout = c.readEntry( "Timeout", s_startupDefaultTimeout );
bool newBusyCursor =cb_busyCursor->currentIndex()!=0;
bool newBusyCursor =cb_busyCursor->currentIndex()!=0;
bool newTaskbarButton =cb_taskbarButton->isChecked();
bool newTaskbarButton =cb_taskbarButton->isChecked();
bool newBusyBlinking= cb_busyCursor->currentIndex()==2;
bool newBusyBouncing= cb_busyCursor->currentIndex()==3;
bool newBusyBlinking= cb_busyCursor->currentIndex()==2;
bool newBusyBouncing= cb_busyCursor->currentIndex()==3;
unsigned int newCursorTimeout = sb_cursorTimeout->value();
unsigned int newCursorTimeout = sb_cursorTimeout->value();
unsigned int newTaskbarTimeout = sb_taskbarTimeout->value();
unsigned int newTaskbarTimeout = sb_taskbarTimeout->value();
emit changed(
savedBusyCursor != newBusyCursor
||
savedTaskbarButton != newTaskbarButton
||
savedCursorTimeout != newCursorTimeout
||
savedTaskbarTimeout != newTaskbarTimeout
||
savedBusyBlinking != newBusyBlinking
||
savedBusyBouncing != newBusyBouncing
);
emit changed(
savedBusyCursor != newBusyCursor
||
savedTaskbarButton != newTaskbarButton
||
savedCursorTimeout != newCursorTimeout
||
savedTaskbarTimeout != newTaskbarTimeout
||
savedBusyBlinking != newBusyBlinking
||
savedBusyBouncing != newBusyBouncing
);
}
#include "kcmlaunch.moc"
......@@ -161,8 +161,9 @@ QList<Plasma::Package> KCMLookandFeel::availablePackages(const QString &componen
QStringList paths;
const QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
paths.reserve(dataPaths.count());
for (const QString &path : dataPaths) {
QDir dir(path + "/plasma/look-and-feel");
QDir dir(path + QStringLiteral("/plasma/look-and-feel"));
paths << dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot);
}