summaryrefslogtreecommitdiffstats
path: root/tools/qtconfig
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-10-06 17:01:14 +0200
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-10-06 17:01:14 +0200
commitd0dc82056231d40978e3369f2f4910298560bf98 (patch)
tree57af6d7438e576f4b232e9b448b40debb07d9b6a /tools/qtconfig
parent311170a69e61fdd0fa4c302ec9ceb33df2c49a5d (diff)
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/qtconfig')
-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 30617e40ff..443effa0aa 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 5bd3592cc1..1a304052e0 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 196cdeae74..a700b8d338 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 ee3513d5c8..f3e5f71727 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 a066d4efe8..cb06e5a99d 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