summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-25 09:24:40 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-25 09:26:26 (GMT)
commit30ed4ee8cee66bcf3ddf001118ba4905a8bfe644 (patch)
tree78e89a182680f32da4b2908d6bd8c06765a12431 /src/gui/styles
parentbd9197b8c344e2f259f5e1c08a746464a04687bb (diff)
downloadQt-30ed4ee8cee66bcf3ddf001118ba4905a8bfe644.zip
Qt-30ed4ee8cee66bcf3ddf001118ba4905a8bfe644.tar.gz
Qt-30ed4ee8cee66bcf3ddf001118ba4905a8bfe644.tar.bz2
Fixed 'crazy' warnings about using a string instead of a character
Wherever I found that we were using a string instead of a single char I fixed the code. Reviewed-by: olivier
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp6
-rw-r--r--src/gui/styles/qcommonstyle.cpp4
-rw-r--r--src/gui/styles/qplastiquestyle.cpp4
-rw-r--r--src/gui/styles/qstyle.cpp2
-rw-r--r--src/gui/styles/qstyleoption.cpp8
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
6 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index 3fb63f2..5c37794 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -1646,8 +1646,8 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
QPixmap cache;
QString pixmapName = QStyleHelper::uniqueName(QLatin1String("headersection"), option, option->rect.size());
- pixmapName += QLatin1String("-") + QString::number(int(header->position));
- pixmapName += QLatin1String("-") + QString::number(int(header->orientation));
+ pixmapName += QString::number(- int(header->position));
+ pixmapName += QString::number(- int(header->orientation));
QRect r = option->rect;
QColor gradientStopColor;
QColor gradientStartColor = option->palette.button().color();
@@ -3858,7 +3858,7 @@ void QCleanlooksStyle::polish(QApplication *app)
dataDirs = QLatin1String("/usr/local/share/:/usr/share/");
dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
- d->iconDirs = dataDirs.split(QLatin1String(":"));
+ d->iconDirs = dataDirs.split(QLatin1Char(':'));
#endif
}
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index a46dbd7..1285598 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -851,7 +851,7 @@ void QCommonStylePrivate::lookupIconTheme() const
dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
QStringList kdeDirs = QString::fromLocal8Bit(getenv("KDEDIRS")).split(QLatin1Char(':'));
foreach (const QString &dirName, kdeDirs)
- dataDirs.append(QLatin1String(":") + dirName + QLatin1String("/share"));
+ dataDirs.append(QLatin1Char(':') + dirName + QLatin1String("/share"));
iconDirs = dataDirs.split(QLatin1Char(':'));
QFileInfo fileInfo(QLatin1String("/usr/share/icons/default.kde"));
@@ -893,7 +893,7 @@ QIconTheme QCommonStylePrivate::parseIndexFile(const QString &themeName) const
parents = line.split(QLatin1Char(','));
}
- if (line.startsWith(QLatin1String("["))) {
+ if (line.startsWith(QLatin1Char('['))) {
line = line.trimmed();
line.chop(1);
QString dirName = line.right(line.length() - 1);
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 587f2b5..91ad64e 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -2845,8 +2845,8 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
QPixmap cache;
QString pixmapName = uniqueName(QLatin1String("headersection"), option, option->rect.size());
- pixmapName += QLatin1String("-") + QString::number(int(header->position));
- pixmapName += QLatin1String("-") + QString::number(int(header->orientation));
+ pixmapName += QString::number(- int(header->position));
+ pixmapName += QString::number(- int(header->orientation));
if (!UsePixmapCache || !QPixmapCache::find(pixmapName, cache)) {
cache = QPixmap(option->rect.size());
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index 514f67b..3fab682 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -2439,7 +2439,7 @@ QDebug operator<<(QDebug debug, QStyle::State state)
qSort(states);
debug << states.join(QLatin1String(" | "));
- debug << ")";
+ debug << ')';
return debug;
}
#endif
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index 5b1bc61..e441101 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -5362,10 +5362,10 @@ QDebug operator<<(QDebug debug, const QStyleOption &option)
{
debug << "QStyleOption(";
debug << QStyleOption::OptionType(option.type);
- debug << "," << (option.direction == Qt::RightToLeft ? "RightToLeft" : "LeftToRight");
- debug << "," << option.state;
- debug << "," << option.rect;
- debug << ")";
+ debug << ',' << (option.direction == Qt::RightToLeft ? "RightToLeft" : "LeftToRight");
+ debug << ',' << option.state;
+ debug << ',' << option.rect;
+ debug << ')';
return debug;
}
#endif
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index fdd51c3..1231561 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -1555,7 +1555,7 @@ QVector<QCss::StyleRule> QStyleSheetStyle::styleRules(const QWidget *w) const
if (widCacheIt == styleSheetCache->constEnd()) {
parser.init(wid->styleSheet());
if (!parser.parse(&ss)) {
- parser.init(QLatin1String("* {") + wid->styleSheet() + QLatin1String("}"));
+ parser.init(QLatin1String("* {") + wid->styleSheet() + QLatin1Char('}'));
if (!parser.parse(&ss))
qWarning("Could not parse stylesheet of widget %p", wid);
}