generic: misc cleanups

This commit is contained in:
Ivailo Monev 2015-07-13 19:51:51 +03:00
parent ada82e05bd
commit ea7d68585f
6 changed files with 4 additions and 14 deletions

View file

@ -160,10 +160,10 @@ KdmLayoutBox::update(QStack<QSize> &parentSizes, const QRect &parentGeometry, bo
if (havetot < opttot + (ccnt - 1) * spacing)
spacing = (havetot - opttot) / (ccnt - 1);
int extra = havetot - opttot - (ccnt - 1) * spacing;
int tesum, wesum, textra, wextra;
int tesum, wesum, wextra;
do {
tesum = wesum = esum;
textra = wextra = extra;
wextra = extra;
int idx = 0;
forEachVisibleChild (itm) {
if (!lhs[idx].done) {

View file

@ -41,7 +41,7 @@ int main( int argc, char* argv[] )
usage( argv[ 0 ] );
bool test = false;
bool print_pid = false;
int* cpid;
int* cpid = 0;
for( int i = 2; // 1 is the theme
i < argc;
++i )

View file

@ -351,6 +351,3 @@ Qt::KeyboardModifiers x11ToQtKeyboardModifiers(int state)
#endif
} // namespace
#ifndef KCMRULES
#include "moc_utils.cpp"
#endif

View file

@ -788,13 +788,11 @@ void KSignalPlotterPrivate::calculateNiceRange()
{
qreal max = mUserMaxValue;
qreal min = mUserMinValue;
bool minFromUser = true;
if( mUseAutoRange ) {
if(!isnan(mMaxValue) && mMaxValue * 0.99 > max) //Allow max value to go very slightly over the given max, for rounding reasons
max = mMaxValue;
if(!isnan(mMinValue) && mMinValue * 0.99 < min) {
min = mMinValue;
minFromUser = false;
}
}

View file

@ -396,7 +396,7 @@ void Trash::dropEvent(QGraphicsSceneDragDropEvent *event)
QSizeF Trash::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
{
if (which == Qt::PreferredSize) {
int iconSize;
int iconSize = 0;
switch (formFactor()) {
case Plasma::Planar:

View file

@ -109,11 +109,6 @@ void MonitorButton::paint(QPainter *p,
Q_UNUSED(option)
Q_UNUSED(widget)
QIcon::Mode mode = QIcon::Disabled;
if (isChecked()) {
mode = QIcon::Normal;
}
QPixmap icon = Plasma::PaintUtils::transition(d->icon.pixmap(d->imageSize, QIcon::Disabled),
d->icon.pixmap(d->imageSize, QIcon::Normal),
isChecked() ? 1 : d->highlighter.currentValue());