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:
Allen Winter 2008-10-12 10:57:42 +00:00
parent 492fe0e8aa
commit 8716f930ec
4 changed files with 10 additions and 10 deletions

View File

@ -1729,7 +1729,7 @@ void AppletPrivate::init()
// find where the Package is
QString path = KStandardDirs::locate(
"data",
"plasma/plasmoids/" + appletDescription.pluginName() + "/");
"plasma/plasmoids/" + appletDescription.pluginName() + '/');
if (path.isEmpty()) {
q->setFailedToLaunch(

View File

@ -93,8 +93,8 @@ PlasmaAppletItemModel::PlasmaAppletItemModel(KConfigGroup configGroup, QObject *
KCategorizedItemsViewModels::DefaultItemModel(parent),
m_configGroup(configGroup)
{
m_used = m_configGroup.readEntry("used").split(",");
m_favorites = m_configGroup.readEntry("favorites").split(",");
m_used = m_configGroup.readEntry("used").split(',');
m_favorites = m_configGroup.readEntry("favorites").split(',');
connect(KSycoca::self(), SIGNAL(databaseChanged()), this, SLOT(populateModel()));
}
@ -114,7 +114,7 @@ void PlasmaAppletItemModel::populateModel()
}
QString id = rx.cap(1);
foreach (const QString &plugin, i.value().split(",")) {
foreach (const QString &plugin, i.value().split(',')) {
extraPluginAttrs[plugin]["recommended." + id] = true;
}
}

View File

@ -395,7 +395,7 @@ void ConfigXmlHandler::addItem()
} else if (m_type == "stringlist") {
//FIXME: the split() is naive and will break on lists with ,'s in them
item = m_config->addItemStringList(m_name, *d->newStringList(),
m_default.split(","), m_key);
m_default.split(','), m_key);
} else if (m_type == "uint") {
KConfigSkeleton::ItemUInt *uintItem =
m_config->addItemUInt(m_name, *d->newUint(), m_default.toUInt(), m_key);
@ -425,7 +425,7 @@ void ConfigXmlHandler::addItem()
}
item = doubleItem;
} else if (m_type == "intlist") {
QStringList tmpList = m_default.split(",");
QStringList tmpList = m_default.split(',');
QList<qint32> defaultList;
foreach (const QString &tmp, tmpList) {
defaultList.append(tmp.toInt());
@ -448,7 +448,7 @@ void ConfigXmlHandler::addItem()
*/
} else if (m_type == "point") {
QPoint defaultPoint;
QStringList tmpList = m_default.split(",");
QStringList tmpList = m_default.split(',');
while (tmpList.size() >= 2) {
defaultPoint.setX(tmpList[0].toInt());
defaultPoint.setY(tmpList[1].toInt());
@ -456,7 +456,7 @@ void ConfigXmlHandler::addItem()
item = m_config->addItemPoint(m_name, *d->newPoint(), defaultPoint, m_key);
} else if (m_type == "rect") {
QRect defaultRect;
QStringList tmpList = m_default.split(",");
QStringList tmpList = m_default.split(',');
while (tmpList.size() >= 4) {
defaultRect.setCoords(tmpList[0].toInt(), tmpList[1].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);
} else if (m_type == "size") {
QSize defaultSize;
QStringList tmpList = m_default.split(",");
QStringList tmpList = m_default.split(',');
while (tmpList.size() >= 2) {
defaultSize.setWidth(tmpList[0].toInt());
defaultSize.setHeight(tmpList[1].toInt());

View File

@ -97,7 +97,7 @@ void TextEdit::dataUpdated(const QString &sourceName, const Plasma::DataEngine::
foreach (const QVariant &v, data) {
if (v.canConvert(QVariant::String)) {
te->append(v.toString() + "\n");
te->append(v.toString() + '\n');
}
}
}