[tracking] Apply coding style
- massage trackingSetup macro to look like a function call
This commit is contained in:
parent
789561be6a
commit
5623d8086b
@ -46,6 +46,7 @@ TrackingPage::TrackingPage( Config* config, QWidget* parent )
|
|||||||
// where the xButton and xCheckBox is connected to the xTracking
|
// where the xButton and xCheckBox is connected to the xTracking
|
||||||
// configuration object; that takes macro-trickery, unfortunately.
|
// configuration object; that takes macro-trickery, unfortunately.
|
||||||
#define trackingSetup( x ) \
|
#define trackingSetup( x ) \
|
||||||
|
do \
|
||||||
{ \
|
{ \
|
||||||
connect( ui->x##CheckBox, &QCheckBox::stateChanged, this, &TrackingPage::buttonChecked ); \
|
connect( ui->x##CheckBox, &QCheckBox::stateChanged, this, &TrackingPage::buttonChecked ); \
|
||||||
connect( ui->x##CheckBox, \
|
connect( ui->x##CheckBox, \
|
||||||
@ -62,15 +63,17 @@ TrackingPage::TrackingPage( Config* config, QWidget* parent )
|
|||||||
QDesktopServices::openUrl( url ); \
|
QDesktopServices::openUrl( url ); \
|
||||||
} \
|
} \
|
||||||
} ); \
|
} ); \
|
||||||
}
|
} while ( false )
|
||||||
|
|
||||||
trackingSetup( install ) trackingSetup( machine ) trackingSetup( user )
|
trackingSetup( install );
|
||||||
|
trackingSetup( machine );
|
||||||
|
trackingSetup( user );
|
||||||
|
|
||||||
#undef trackingSetup
|
#undef trackingSetup
|
||||||
|
|
||||||
connect( config, &Config::generalPolicyChanged, [this]( const QString& url ) {
|
connect( config, &Config::generalPolicyChanged, [this]( const QString& url ) {
|
||||||
this->ui->generalPolicyLabel->setVisible( !url.isEmpty() );
|
this->ui->generalPolicyLabel->setVisible( !url.isEmpty() );
|
||||||
} );
|
} );
|
||||||
connect( ui->generalPolicyLabel, &QLabel::linkActivated, [config] {
|
connect( ui->generalPolicyLabel, &QLabel::linkActivated, [config] {
|
||||||
QString url( config->generalPolicy() );
|
QString url( config->generalPolicy() );
|
||||||
if ( !url.isEmpty() )
|
if ( !url.isEmpty() )
|
||||||
|
Loading…
Reference in New Issue
Block a user