[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/kphotoalbum
From: Jan Kundrát <jkt () gentoo ! org>
Date: 2010-12-20 0:08:05
Message-ID: 20101220000805.36213AC8AA () svn ! kde ! org
[Download RAW message or body]
SVN commit 1207847 by jkt:
Fix warning about signed/unsigned comparison
Patch by Andreas, I added one more fix.
M +1 -1 Browser/CategoryPage.cpp
M +1 -1 DB/Result.cpp
M +1 -1 DB/Result.h
M +1 -1 HTMLGenerator/Generator.cpp
M +1 -1 ThumbnailView/ThumbnailModel.cpp
--- trunk/extragear/graphics/kphotoalbum/Browser/CategoryPage.cpp #1207846:1207847
@@ -49,7 +49,7 @@
DB::ImageSearchInfo info = searchInfo();
info.addAnd( _category->name(), name );
- if (DB::ImageDB::instance()->search(info).size() <= \
Settings::SettingsData::instance()->autoShowThumbnailView()) { + if \
(static_cast<uint>(DB::ImageDB::instance()->search(info).size()) <= \
Settings::SettingsData::instance()->autoShowThumbnailView()) {
browser()->addAction( new Browser::OverviewPage( Breadcrumb(name), info, \
browser() ) ); return new ImageViewPage( info, browser() );
} else
--- trunk/extragear/graphics/kphotoalbum/DB/Result.cpp #1207846:1207847
@@ -60,7 +60,7 @@
return DB::ResultId(_items[index], *this);
}
-int DB::Result::size() const
+uint DB::Result::size() const
{
return _items.size();
}
--- trunk/extragear/graphics/kphotoalbum/DB/Result.h #1207846:1207847
@@ -76,7 +76,7 @@
Result reversed() const;
DB::ResultId at(int index) const;
- int size() const;
+ uint size() const;
bool isEmpty() const;
int indexOf(const DB::ResultId&) const;
ConstIterator begin() const;
--- trunk/extragear/graphics/kphotoalbum/HTMLGenerator/Generator.cpp #1207846:1207847
@@ -80,7 +80,7 @@
if ( !ok )
return;
const DB::Result& imageList = _setup.imageList();
- for (int index = 0; index < imageList.size(); ++index) {
+ for (uint index = 0; index < imageList.size(); ++index) {
DB::ResultId current = imageList.at(index);
DB::ResultId prev;
DB::ResultId next;
--- trunk/extragear/graphics/kphotoalbum/ThumbnailView/ThumbnailModel.cpp \
#1207846:1207847 @@ -243,7 +243,7 @@
QVariant ThumbnailView::ThumbnailModel::data(const QModelIndex& index, int role ) \
const {
- if ( !index.isValid() || index.row() >= _displayList.size())
+ if ( !index.isValid() || static_cast<uint>(index.row()) >= _displayList.size())
return QVariant();
if ( role == Qt::DecorationRole ) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic