summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-08-16 11:00:53 (GMT)
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-08-16 11:00:53 (GMT)
commit72c1cb2ffdfb2742985e12025d4578aa2fe80ce7 (patch)
tree970fe5d701a46e57a3a1bab3870f189698fab27d /src/gui
parentaa09d4f9c2d47348e6eac76e66500f4807b132a3 (diff)
downloadQt-72c1cb2ffdfb2742985e12025d4578aa2fe80ce7.zip
Qt-72c1cb2ffdfb2742985e12025d4578aa2fe80ce7.tar.gz
Qt-72c1cb2ffdfb2742985e12025d4578aa2fe80ce7.tar.bz2
Doc: Fix links and silence qdoc warnings.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qicon.cpp28
-rw-r--r--src/gui/text/qfontmetrics.cpp15
2 files changed, 22 insertions, 21 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 0d854d0..677cc44 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -871,7 +871,7 @@ QList<QSize> QIcon::availableSizes(Mode mode, State state) const
\since 4.6
Sets the search paths for icon themes to \a paths.
- \sa themeSearchPaths(), fromTheme()
+ \sa themeSearchPaths(), fromTheme(), setThemeName()
*/
void QIcon::setThemeSearchPaths(const QStringList &paths)
{
@@ -893,7 +893,7 @@ void QIcon::setThemeSearchPaths(const QStringList &paths)
On Mac the default search path will search in the
[Contents/Resources/icons] part of the application bundle.
- \sa setThemeSearchPaths(), fromTheme()
+ \sa setThemeSearchPaths(), fromTheme(), setThemeName()
*/
QStringList QIcon::themeSearchPaths()
{
@@ -903,16 +903,17 @@ QStringList QIcon::themeSearchPaths()
/*!
\since 4.6
- Sets the current icon theme.
+ Sets the current icon theme to \a name.
- The name should correspond to a directory name in the
- current \ themeSearchPath() containing an index.theme
- file describing it's contents..
+ The \a name should correspond to a directory name in the
+ current themeSearchPath() containing an index.theme
+ file describing it's contents.
+ \sa themeSearchPaths(), themeName()
*/
-void QIcon::setThemeName(const QString &path)
+void QIcon::setThemeName(const QString &name)
{
- QIconLoader::instance()->setThemeName(path);
+ QIconLoader::instance()->setThemeName(name);
}
/*!
@@ -923,7 +924,8 @@ void QIcon::setThemeName(const QString &path)
On X11, the current icon theme depends on your desktop
settings. On other platforms it is not set by default.
- \sa themeSearchPaths(), fromTheme(), hasThemeIcon()
+ \sa setThemeName(), themeSearchPaths(), fromTheme(),
+ hasThemeIcon()
*/
QString QIcon::themeName()
{
@@ -960,7 +962,7 @@ QString QIcon::themeName()
compliant theme in one of your themeSearchPaths() and set the
appropriate themeName().
- \sa themeName(), themeSearchPaths()
+ \sa themeName(), setThemeName(), themeSearchPaths()
*/
QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
{
@@ -994,10 +996,10 @@ QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
/*!
\since 4.6
- Returns true if there is an icon available for a \a name in the current
- icon theme, otherwise returns false.
+ Returns true if there is an icon available for \a name in the
+ current icon theme, otherwise returns false.
- \sa themeSearchPaths(), fromTheme()
+ \sa themeSearchPaths(), fromTheme(), setThemeName()
*/
bool QIcon::hasThemeIcon(const QString &name)
{
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index 3e074a7..b3d1a5f 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -859,24 +859,23 @@ QRect QFontMetrics::tightBoundingRect(const QString &text) const
right-to-left layouts, and on the left side for right-to-left
layouts. Note that this behavior is independent of the text
language.
-
*/
-QString QFontMetrics::elidedText(const QString &_text, Qt::TextElideMode mode, int width, int flags) const
+QString QFontMetrics::elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags) const
{
- QString text = _text;
+ QString _text = text;
if (!(flags & Qt::TextLongestVariant)) {
int posA = 0;
- int posB = text.indexOf(QLatin1Char('\x9c'));
+ int posB = _text.indexOf(QLatin1Char('\x9c'));
while (posB >= 0) {
- QString portion = text.mid(posA, posB - posA);
+ QString portion = _text.mid(posA, posB - posA);
if (size(flags, portion).width() <= width)
return portion;
posA = posB + 1;
- posB = text.indexOf(QLatin1Char('\x9c'), posA);
+ posB = _text.indexOf(QLatin1Char('\x9c'), posA);
}
- text = text.mid(posA);
+ _text = _text.mid(posA);
}
- QStackTextEngine engine(text, QFont(d));
+ QStackTextEngine engine(_text, QFont(d));
return engine.elidedText(mode, width, flags);
}