# HG changeset patch # User Teemu Piippo # Date 1440900967 -10800 # Node ID 70f6900a92d5a239392bc933ffd6377be0b76b34 # Parent c1526d1877d72517909bd76d138686f94f1f1257 More refactor diff -r c1526d1877d7 -r 70f6900a92d5 src/configDialog.cpp --- a/src/configDialog.cpp Sun Aug 30 04:57:09 2015 +0300 +++ b/src/configDialog.cpp Sun Aug 30 05:16:07 2015 +0300 @@ -697,7 +697,10 @@ QDialog (parent, f), seq (seq) { lb_output = new QLabel; - IMPLEMENT_DIALOG_BUTTONS + + bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); \ + connect (bbx_buttons, SIGNAL (accepted()), this, SLOT (accept())); \ + connect (bbx_buttons, SIGNAL (rejected()), this, SLOT (reject())); \ setWhatsThis (tr ("Into this dialog you can input a key sequence for use as a " "shortcut in LDForge. Use OK to confirm the new shortcut and Cancel to " diff -r c1526d1877d7 -r 70f6900a92d5 src/mainwindow.h --- a/src/mainwindow.h Sun Aug 30 04:57:09 2015 +0300 +++ b/src/mainwindow.h Sun Aug 30 05:16:07 2015 +0300 @@ -37,22 +37,16 @@ class Ui_LDForgeUI; struct Primitive; -// Stuff for dialogs -#define IMPLEMENT_DIALOG_BUTTONS \ - bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); \ - connect (bbx_buttons, SIGNAL (accepted()), this, SLOT (accept())); \ - connect (bbx_buttons, SIGNAL (rejected()), this, SLOT (reject())); \ - class LDQuickColor { PROPERTY (public, LDColor, color, setColor, STOCK_WRITE) PROPERTY (public, QToolButton*, toolButton, setToolButton, STOCK_WRITE) - public: - LDQuickColor (LDColor color, QToolButton* toolButton); - bool isSeparator() const; +public: + LDQuickColor (LDColor color, QToolButton* toolButton); + bool isSeparator() const; - static LDQuickColor getSeparator(); + static LDQuickColor getSeparator(); }; //