extra ';', remove custom implementation of qMin()

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=718860
This commit is contained in:
Pino Toscano 2007-09-29 21:45:20 +00:00
parent 8f9c48ce04
commit dae62a8fcc

View File

@ -3,10 +3,9 @@
#define PIX_SIZE 64 #define PIX_SIZE 64
#define MAX_OFFSET 16 #define MAX_OFFSET 16
#define MAX_COUNT 5 #define MAX_COUNT 5
#define min(A, B) (((A) < (B)) ? (A) : (B))
CustomDragTreeView::CustomDragTreeView(QWidget * parent) CustomDragTreeView::CustomDragTreeView(QWidget * parent)
: QTreeView(parent) {}; : QTreeView(parent) {}
void CustomDragTreeView::startDrag ( Qt::DropActions supportedActions ) void CustomDragTreeView::startDrag ( Qt::DropActions supportedActions )
{ {
@ -24,7 +23,7 @@ void CustomDragTreeView::startDrag ( Qt::DropActions supportedActions )
return; return;
} }
int size = PIX_SIZE + (min(MAX_COUNT, indexes.count()) * MAX_OFFSET); int size = PIX_SIZE + (qMin(MAX_COUNT, indexes.count()) * MAX_OFFSET);
int off = MAX_OFFSET; int off = MAX_OFFSET;
if (indexes.count() > MAX_COUNT) { if (indexes.count() > MAX_COUNT) {
off = (MAX_OFFSET * MAX_COUNT) / indexes.count(); off = (MAX_OFFSET * MAX_COUNT) / indexes.count();