use split('x') instead of split("x")
add single chars instead of single char strings svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=870295
This commit is contained in:
parent
492fe0e8aa
commit
8716f930ec
@ -1729,7 +1729,7 @@ void AppletPrivate::init()
|
|||||||
// find where the Package is
|
// find where the Package is
|
||||||
QString path = KStandardDirs::locate(
|
QString path = KStandardDirs::locate(
|
||||||
"data",
|
"data",
|
||||||
"plasma/plasmoids/" + appletDescription.pluginName() + "/");
|
"plasma/plasmoids/" + appletDescription.pluginName() + '/');
|
||||||
|
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
q->setFailedToLaunch(
|
q->setFailedToLaunch(
|
||||||
|
@ -93,8 +93,8 @@ PlasmaAppletItemModel::PlasmaAppletItemModel(KConfigGroup configGroup, QObject *
|
|||||||
KCategorizedItemsViewModels::DefaultItemModel(parent),
|
KCategorizedItemsViewModels::DefaultItemModel(parent),
|
||||||
m_configGroup(configGroup)
|
m_configGroup(configGroup)
|
||||||
{
|
{
|
||||||
m_used = m_configGroup.readEntry("used").split(",");
|
m_used = m_configGroup.readEntry("used").split(',');
|
||||||
m_favorites = m_configGroup.readEntry("favorites").split(",");
|
m_favorites = m_configGroup.readEntry("favorites").split(',');
|
||||||
connect(KSycoca::self(), SIGNAL(databaseChanged()), this, SLOT(populateModel()));
|
connect(KSycoca::self(), SIGNAL(databaseChanged()), this, SLOT(populateModel()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ void PlasmaAppletItemModel::populateModel()
|
|||||||
}
|
}
|
||||||
QString id = rx.cap(1);
|
QString id = rx.cap(1);
|
||||||
|
|
||||||
foreach (const QString &plugin, i.value().split(",")) {
|
foreach (const QString &plugin, i.value().split(',')) {
|
||||||
extraPluginAttrs[plugin]["recommended." + id] = true;
|
extraPluginAttrs[plugin]["recommended." + id] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -395,7 +395,7 @@ void ConfigXmlHandler::addItem()
|
|||||||
} else if (m_type == "stringlist") {
|
} else if (m_type == "stringlist") {
|
||||||
//FIXME: the split() is naive and will break on lists with ,'s in them
|
//FIXME: the split() is naive and will break on lists with ,'s in them
|
||||||
item = m_config->addItemStringList(m_name, *d->newStringList(),
|
item = m_config->addItemStringList(m_name, *d->newStringList(),
|
||||||
m_default.split(","), m_key);
|
m_default.split(','), m_key);
|
||||||
} else if (m_type == "uint") {
|
} else if (m_type == "uint") {
|
||||||
KConfigSkeleton::ItemUInt *uintItem =
|
KConfigSkeleton::ItemUInt *uintItem =
|
||||||
m_config->addItemUInt(m_name, *d->newUint(), m_default.toUInt(), m_key);
|
m_config->addItemUInt(m_name, *d->newUint(), m_default.toUInt(), m_key);
|
||||||
@ -425,7 +425,7 @@ void ConfigXmlHandler::addItem()
|
|||||||
}
|
}
|
||||||
item = doubleItem;
|
item = doubleItem;
|
||||||
} else if (m_type == "intlist") {
|
} else if (m_type == "intlist") {
|
||||||
QStringList tmpList = m_default.split(",");
|
QStringList tmpList = m_default.split(',');
|
||||||
QList<qint32> defaultList;
|
QList<qint32> defaultList;
|
||||||
foreach (const QString &tmp, tmpList) {
|
foreach (const QString &tmp, tmpList) {
|
||||||
defaultList.append(tmp.toInt());
|
defaultList.append(tmp.toInt());
|
||||||
@ -448,7 +448,7 @@ void ConfigXmlHandler::addItem()
|
|||||||
*/
|
*/
|
||||||
} else if (m_type == "point") {
|
} else if (m_type == "point") {
|
||||||
QPoint defaultPoint;
|
QPoint defaultPoint;
|
||||||
QStringList tmpList = m_default.split(",");
|
QStringList tmpList = m_default.split(',');
|
||||||
while (tmpList.size() >= 2) {
|
while (tmpList.size() >= 2) {
|
||||||
defaultPoint.setX(tmpList[0].toInt());
|
defaultPoint.setX(tmpList[0].toInt());
|
||||||
defaultPoint.setY(tmpList[1].toInt());
|
defaultPoint.setY(tmpList[1].toInt());
|
||||||
@ -456,7 +456,7 @@ void ConfigXmlHandler::addItem()
|
|||||||
item = m_config->addItemPoint(m_name, *d->newPoint(), defaultPoint, m_key);
|
item = m_config->addItemPoint(m_name, *d->newPoint(), defaultPoint, m_key);
|
||||||
} else if (m_type == "rect") {
|
} else if (m_type == "rect") {
|
||||||
QRect defaultRect;
|
QRect defaultRect;
|
||||||
QStringList tmpList = m_default.split(",");
|
QStringList tmpList = m_default.split(',');
|
||||||
while (tmpList.size() >= 4) {
|
while (tmpList.size() >= 4) {
|
||||||
defaultRect.setCoords(tmpList[0].toInt(), tmpList[1].toInt(),
|
defaultRect.setCoords(tmpList[0].toInt(), tmpList[1].toInt(),
|
||||||
tmpList[2].toInt(), tmpList[3].toInt());
|
tmpList[2].toInt(), tmpList[3].toInt());
|
||||||
@ -464,7 +464,7 @@ void ConfigXmlHandler::addItem()
|
|||||||
item = m_config->addItemRect(m_name, *d->newRect(), defaultRect, m_key);
|
item = m_config->addItemRect(m_name, *d->newRect(), defaultRect, m_key);
|
||||||
} else if (m_type == "size") {
|
} else if (m_type == "size") {
|
||||||
QSize defaultSize;
|
QSize defaultSize;
|
||||||
QStringList tmpList = m_default.split(",");
|
QStringList tmpList = m_default.split(',');
|
||||||
while (tmpList.size() >= 2) {
|
while (tmpList.size() >= 2) {
|
||||||
defaultSize.setWidth(tmpList[0].toInt());
|
defaultSize.setWidth(tmpList[0].toInt());
|
||||||
defaultSize.setHeight(tmpList[1].toInt());
|
defaultSize.setHeight(tmpList[1].toInt());
|
||||||
|
@ -97,7 +97,7 @@ void TextEdit::dataUpdated(const QString &sourceName, const Plasma::DataEngine::
|
|||||||
|
|
||||||
foreach (const QVariant &v, data) {
|
foreach (const QVariant &v, data) {
|
||||||
if (v.canConvert(QVariant::String)) {
|
if (v.canConvert(QVariant::String)) {
|
||||||
te->append(v.toString() + "\n");
|
te->append(v.toString() + '\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user