[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_3_BRANCH: kdelibs/kdeui
From: David Faure <faure () kde ! org>
Date: 2004-10-22 12:23:49
Message-ID: 20041022122349.A363B16C3A () office ! kde ! org
[Download RAW message or body]
CVS commit by faure:
Don't use an uninitialized var (mCurrent) if there are no tips.
M +4 -2 ktip.cpp 1.42.2.1
--- kdelibs/kdeui/ktip.cpp #1.42:1.42.2.1
@@ -95,5 +95,5 @@ void KTipDatabase::addTips(const QString
if (fileName.isEmpty())
{
- kdDebug() << "can't find '" << tipFile << "' in standard dirs" << endl;
+ kdDebug() << "KTipDatabase::addTips: can't find '" << tipFile << "' in standard dirs" << endl;
return;
}
@@ -102,5 +102,5 @@ void KTipDatabase::addTips(const QString
if (!file.open(IO_ReadOnly))
{
- kdDebug() << "can't open '" << fileName << "' for reading" << endl;
+ kdDebug() << "KTipDatabase::addTips: can't open '" << fileName << "' for reading" << endl;
return;
}
@@ -143,4 +143,6 @@ void KTipDatabase::prevTip()
QString KTipDatabase::tip() const
{
+ if (mTips.isEmpty())
+ return QString::null;
return mTips[mCurrent];
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic