Fix several clazy issues:
* Q_PROPERTY should have either NOTIFY or CONSTANT [-Wclazy-qproperty-without-notify] * Use Q_ENUM instead of Q_ENUMS [-Wclazy-qenums] * Add missing a Q_OBJECT macro [-Wclazy-missing-qobject-macro] * Signal/Slot arguments need to be fully-qualified [-Wclazy-fully-qualified-moc-types]
This commit is contained in:
@@ -204,22 +204,24 @@ private:
|
||||
|
||||
/**
|
||||
* There is a bug in QtDesigner of Qt version 4.0, 4.1 and 4.2. If a class declaration
|
||||
* is inside a namespace and it uses the Q_ENUMS macro then QtDesigner doesn't handle
|
||||
* is inside a namespace and it uses the Q_ENUM macro then QtDesigner doesn't handle
|
||||
* the enum(s) correctly in its property editor. This bug is fixed since Qt 4.3.0.
|
||||
*/
|
||||
class FileChooser : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_ENUMS( Mode )
|
||||
public:
|
||||
enum Mode { File, Directory };
|
||||
|
||||
private:
|
||||
Q_ENUM( Mode )
|
||||
Q_PROPERTY( Mode mode READ mode WRITE setMode )
|
||||
Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
|
||||
Q_PROPERTY( QString filter READ filter WRITE setFilter )
|
||||
Q_PROPERTY( QString buttonText READ buttonText WRITE setButtonText )
|
||||
|
||||
public:
|
||||
enum Mode { File, Directory };
|
||||
|
||||
FileChooser (QWidget *parent = 0);
|
||||
virtual ~FileChooser();
|
||||
|
||||
@@ -231,7 +233,7 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
void setFileName( const QString &fn );
|
||||
void setMode( Mode m );
|
||||
void setMode( FileChooser::Mode m );
|
||||
void setFilter ( const QString & );
|
||||
void setButtonText ( const QString & );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user