GTK+ platform theme: cleanup coding style
Change-Id: I5db283d7ed42346d9c2b90acbc342336b450aa97 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
b6e9a8f21a
commit
94d1d84861
@ -56,7 +56,7 @@ public:
|
||||
QPlatformTheme *QGtk2ThemePlugin::create(const QString &key, const QStringList ¶ms)
|
||||
{
|
||||
Q_UNUSED(params);
|
||||
if (!key.compare(QStringLiteral("gtk2"), Qt::CaseInsensitive))
|
||||
if (!key.compare(QLatin1String(QGtk2Theme::name), Qt::CaseInsensitive))
|
||||
return new QGtk2Theme;
|
||||
|
||||
return 0;
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
QGtk2Dialog(GtkWidget *gtkWidget);
|
||||
~QGtk2Dialog();
|
||||
|
||||
GtkDialog* gtkDialog() const;
|
||||
GtkDialog *gtkDialog() const;
|
||||
|
||||
void exec();
|
||||
bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent);
|
||||
@ -93,7 +93,7 @@ QGtk2Dialog::~QGtk2Dialog()
|
||||
gtk_widget_destroy(gtkWidget);
|
||||
}
|
||||
|
||||
GtkDialog* QGtk2Dialog::gtkDialog() const
|
||||
GtkDialog *QGtk2Dialog::gtkDialog() const
|
||||
{
|
||||
return GTK_DIALOG(gtkWidget);
|
||||
}
|
||||
@ -217,7 +217,7 @@ void QGtk2ColorDialogHelper::onColorChanged(QGtk2ColorDialogHelper *dialog)
|
||||
|
||||
void QGtk2ColorDialogHelper::applyOptions()
|
||||
{
|
||||
GtkDialog* gtkDialog = d->gtkDialog();
|
||||
GtkDialog *gtkDialog = d->gtkDialog();
|
||||
gtk_window_set_title(GTK_WINDOW(gtkDialog), options()->windowTitle().toUtf8());
|
||||
|
||||
GtkWidget *gtkColorSelection = gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(gtkDialog));
|
||||
@ -449,7 +449,7 @@ void QGtk2FileDialogHelper::applyOptions()
|
||||
}
|
||||
}
|
||||
|
||||
void QGtk2FileDialogHelper::setNameFilters(const QStringList& filters)
|
||||
void QGtk2FileDialogHelper::setNameFilters(const QStringList &filters)
|
||||
{
|
||||
GtkDialog *gtkDialog = d->gtkDialog();
|
||||
foreach (GtkFileFilter *filter, _filters)
|
||||
@ -501,7 +501,7 @@ void QGtk2FontDialogHelper::hide()
|
||||
d->hide();
|
||||
}
|
||||
|
||||
static QString qt_fontToString(const QFont& font)
|
||||
static QString qt_fontToString(const QFont &font)
|
||||
{
|
||||
PangoFontDescription *desc = pango_font_description_new();
|
||||
pango_font_description_set_size(desc, font.pointSizeF() * PANGO_SCALE);
|
||||
@ -537,7 +537,7 @@ static QString qt_fontToString(const QFont& font)
|
||||
static QFont qt_fontFromString(const QString &name)
|
||||
{
|
||||
QFont font;
|
||||
PangoFontDescription* desc = pango_font_description_from_string(name.toUtf8());
|
||||
PangoFontDescription *desc = pango_font_description_from_string(name.toUtf8());
|
||||
font.setPointSizeF(static_cast<float>(pango_font_description_get_size(desc)) / PANGO_SCALE);
|
||||
|
||||
QString family = QString::fromUtf8(pango_font_description_get_family(desc));
|
||||
|
@ -60,12 +60,12 @@ public:
|
||||
QGtk2ColorDialogHelper();
|
||||
~QGtk2ColorDialogHelper();
|
||||
|
||||
virtual bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent);
|
||||
virtual void exec();
|
||||
virtual void hide();
|
||||
bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent);
|
||||
void exec();
|
||||
void hide();
|
||||
|
||||
virtual void setCurrentColor(const QColor &color);
|
||||
virtual QColor currentColor() const;
|
||||
void setCurrentColor(const QColor &color);
|
||||
QColor currentColor() const;
|
||||
|
||||
private Q_SLOTS:
|
||||
void onAccepted();
|
||||
@ -85,18 +85,18 @@ public:
|
||||
QGtk2FileDialogHelper();
|
||||
~QGtk2FileDialogHelper();
|
||||
|
||||
virtual bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent);
|
||||
virtual void exec();
|
||||
virtual void hide();
|
||||
bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent);
|
||||
void exec();
|
||||
void hide();
|
||||
|
||||
virtual bool defaultNameFilterDisables() const;
|
||||
virtual void setDirectory(const QString &directory);
|
||||
virtual QString directory() const;
|
||||
virtual void selectFile(const QString &filename);
|
||||
virtual QStringList selectedFiles() const;
|
||||
virtual void setFilter();
|
||||
virtual void selectNameFilter(const QString &filter);
|
||||
virtual QString selectedNameFilter() const;
|
||||
bool defaultNameFilterDisables() const;
|
||||
void setDirectory(const QString &directory);
|
||||
QString directory() const;
|
||||
void selectFile(const QString &filename);
|
||||
QStringList selectedFiles() const;
|
||||
void setFilter();
|
||||
void selectNameFilter(const QString &filter);
|
||||
QString selectedNameFilter() const;
|
||||
|
||||
private Q_SLOTS:
|
||||
void onAccepted();
|
||||
@ -122,12 +122,12 @@ public:
|
||||
QGtk2FontDialogHelper();
|
||||
~QGtk2FontDialogHelper();
|
||||
|
||||
virtual bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent);
|
||||
virtual void exec();
|
||||
virtual void hide();
|
||||
bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent);
|
||||
void exec();
|
||||
void hide();
|
||||
|
||||
virtual void setCurrentFont(const QFont &font);
|
||||
virtual QFont currentFont() const;
|
||||
void setCurrentFont(const QFont &font);
|
||||
QFont currentFont() const;
|
||||
|
||||
private Q_SLOTS:
|
||||
void onAccepted();
|
||||
|
@ -51,10 +51,10 @@ class QGtk2Theme : public QGnomeTheme
|
||||
public:
|
||||
QGtk2Theme();
|
||||
|
||||
virtual QVariant themeHint(ThemeHint hint) const;
|
||||
QVariant themeHint(ThemeHint hint) const;
|
||||
|
||||
virtual bool usePlatformNativeDialog(DialogType type) const;
|
||||
virtual QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const;
|
||||
bool usePlatformNativeDialog(DialogType type) const;
|
||||
QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const;
|
||||
|
||||
static const char *name;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user