summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-10-06 15:01:14 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-10-06 15:01:14 (GMT)
commitd0dc82056231d40978e3369f2f4910298560bf98 (patch)
tree57af6d7438e576f4b232e9b448b40debb07d9b6a /tools
parent311170a69e61fdd0fa4c302ec9ceb33df2c49a5d (diff)
downloadQt-d0dc82056231d40978e3369f2f4910298560bf98.zip
Qt-d0dc82056231d40978e3369f2f4910298560bf98.tar.gz
Qt-d0dc82056231d40978e3369f2f4910298560bf98.tar.bz2
Code cleaning with the merge request 2286
The merge request 2286 changes a lot of the QtConfig tool. I took this opportunity to clean some old style mistake.
Diffstat (limited to 'tools')
-rw-r--r--tools/qtconfig/colorbutton.cpp9
-rw-r--r--tools/qtconfig/mainwindow.cpp2
-rw-r--r--tools/qtconfig/paletteeditoradvanced.cpp9
-rw-r--r--tools/qtconfig/previewwidget.h2
-rw-r--r--tools/qtconfig/qtconfig.pro10
5 files changed, 15 insertions, 17 deletions
diff --git a/tools/qtconfig/colorbutton.cpp b/tools/qtconfig/colorbutton.cpp
index 30617e4..443effa 100644
--- a/tools/qtconfig/colorbutton.cpp
+++ b/tools/qtconfig/colorbutton.cpp
@@ -52,19 +52,20 @@
QT_BEGIN_NAMESPACE
ColorButton::ColorButton(QWidget *parent)
- : QAbstractButton(parent), mousepressed(false)
+ : QAbstractButton(parent)
+ , mousepressed(false)
+ , col(Qt::black)
{
setAcceptDrops(true);
- col = Qt::black;
connect(this, SIGNAL(clicked()), SLOT(changeColor()));
}
ColorButton::ColorButton(const QColor &c, QWidget *parent)
: QAbstractButton(parent)
+ , col(c)
{
setAcceptDrops(true);
- col = c;
connect(this, SIGNAL(clicked()), SLOT(changeColor()));
}
@@ -182,7 +183,7 @@ void ColorButton::mouseReleaseEvent(QMouseEvent *e)
void ColorButton::mouseMoveEvent(QMouseEvent *e)
{
- if (! mousepressed)
+ if (!mousepressed)
return;
if ((presspos - e->pos()).manhattanLength() > QApplication::startDragDistance()) {
diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp
index 5bd3592..1a30405 100644
--- a/tools/qtconfig/mainwindow.cpp
+++ b/tools/qtconfig/mainwindow.cpp
@@ -290,7 +290,7 @@ MainWindow::MainWindow()
ui->cursorFlashTimeSpinBox->setValue(QApplication::cursorFlashTime());
ui->wheelScrollLinesSpinBox->setValue(QApplication::wheelScrollLines());
// #############
-// resolveLinksCheckBox->setChecked(qt_resolve_symlinks);
+ // resolveLinksCheckBox->setChecked(qt_resolve_symlinks);
ui->effectsCheckBox->setChecked(QApplication::isEffectEnabled(Qt::UI_General));
ui->effectsFrame->setEnabled(ui->effectsCheckBox->isChecked());
diff --git a/tools/qtconfig/paletteeditoradvanced.cpp b/tools/qtconfig/paletteeditoradvanced.cpp
index 196cdea..a700b8d 100644
--- a/tools/qtconfig/paletteeditoradvanced.cpp
+++ b/tools/qtconfig/paletteeditoradvanced.cpp
@@ -117,12 +117,10 @@ void PaletteEditorAdvanced::paletteSelected(int p)
if(p == 1) { // inactive
ui->groupCentral->setDisabled(ui->checkBuildInactive->isChecked());
ui->groupEffect->setDisabled(ui->checkBuildInactive->isChecked());
- }
- else if (p == 2) { // disabled
+ } else if (p == 2) { // disabled
ui->groupCentral->setDisabled(ui->checkBuildDisabled->isChecked());
ui->groupEffect->setDisabled(ui->checkBuildDisabled->isChecked());
- }
- else {
+ } else {
ui->groupCentral->setEnabled(true);
ui->groupEffect->setEnabled(true);
}
@@ -263,8 +261,7 @@ QPalette PaletteEditorAdvanced::buildEffect(QPalette::ColorGroup colorGroup,
result.setColor(colorGroup, effectRole,
calculatedPalette.color(colorGroup, effectRole));
}
- }
- else {
+ } else {
QColor btn = basePalette.color(colorGroup, QPalette::Button);
result.setColor(colorGroup, QPalette::Light, btn.lighter());
diff --git a/tools/qtconfig/previewwidget.h b/tools/qtconfig/previewwidget.h
index ee3513d..f3e5f71 100644
--- a/tools/qtconfig/previewwidget.h
+++ b/tools/qtconfig/previewwidget.h
@@ -61,7 +61,7 @@ public:
bool eventFilter(QObject *, QEvent *);
private:
void closeEvent(QCloseEvent *);
- Ui::PreviewWidget* ui;
+ Ui::PreviewWidget *ui;
};
QT_END_NAMESPACE
diff --git a/tools/qtconfig/qtconfig.pro b/tools/qtconfig/qtconfig.pro
index a066d4e..cb06e5a 100644
--- a/tools/qtconfig/qtconfig.pro
+++ b/tools/qtconfig/qtconfig.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-CONFIG += qt warn_on x11
+CONFIG += qt warn_on x11
build_all:!build_pass {
CONFIG -= build_all
CONFIG += release
@@ -19,10 +19,10 @@ FORMS = mainwindow.ui paletteeditoradvanced.ui previewwidget.ui
RESOURCES = qtconfig.qrc
PROJECTNAME = Qt Configuration
-TARGET = qtconfig
-DESTDIR = ../../bin
+TARGET = qtconfig
+DESTDIR = ../../bin
target.path=$$[QT_INSTALL_BINS]
INSTALLS += target
-INCLUDEPATH += .
-DBFILE = qtconfig.db
+INCLUDEPATH += .
+DBFILE = qtconfig.db