Blob Blame History Raw
From c6c7cc35e52edd2cf1bd318b2e33622762bb30bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=96mer=20Fad=C4=B1l=20Usta?= <omerusta@gmail.com>
Date: Thu, 12 May 2022 07:31:48 +0000
Subject: [PATCH] Fix build with GCC 12 (standard attributes in middle of decl-specifiers)

---
 src/core/kexiinternalpart.h                  | 18 +++++++++---------
 src/core/kexipart.h                          |  4 ++--
 src/plugins/reports/KexiDBReportDataSource.h |  2 +-
 src/widget/KexiFileWidgetInterface.h         |  4 ++--
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/core/kexiinternalpart.h b/src/core/kexiinternalpart.h
index a25eb18fb..ee8b3733d 100644
--- a/src/core/kexiinternalpart.h
+++ b/src/core/kexiinternalpart.h
@@ -57,14 +57,14 @@ public:
      on widget's creation. Depending on implementation, the created widget can write its
      state (e.g. result or status information) back to this argument.
      Created widget will have assigned \a parent widget and \a objName name. */
-    static Q_REQUIRED_RESULT QWidget *createWidgetInstance(const QString &className,
+    Q_REQUIRED_RESULT static QWidget *createWidgetInstance(const QString &className,
                                          const char* widgetClass,
                                          KDbMessageHandler *msgHdr,
                                          QWidget *parent, const char *objName = nullptr,
                                          QMap<QString, QString>* args = nullptr);
 
     /*! For convenience. */
-    static Q_REQUIRED_RESULT QWidget *createWidgetInstance(const QString &className,
+    Q_REQUIRED_RESULT static QWidget *createWidgetInstance(const QString &className,
                                          KDbMessageHandler *msgHdr,
                                          QWidget *parent, const char *objName = nullptr,
                                          QMap<QString, QString>* args = nullptr);
@@ -72,7 +72,7 @@ public:
     /*! Creates a new object instance using part pointed by \a className.
      \a widgetClass is a pseudo class used in case when the part offers more
      than one object type. */
-    static Q_REQUIRED_RESULT QObject *createObjectInstance(const QString &className,
+    Q_REQUIRED_RESULT static QObject *createObjectInstance(const QString &className,
                                          const char* objectClass, KDbMessageHandler *msgHdr,
                                          QObject *parent, const char *objName = nullptr,
                                          QMap<QString, QString>* args = nullptr);
@@ -84,7 +84,7 @@ public:
      \a msgHdr is a message handler for displaying error messages.
      The window is assigned to the main window,
      and \a objName name is set. */
-    static Q_REQUIRED_RESULT KexiWindow *createKexiWindowInstance(const QString &className,
+    Q_REQUIRED_RESULT static KexiWindow *createKexiWindowInstance(const QString &className,
             KDbMessageHandler *msgHdr, const char *objName = nullptr);
 
     /*! Creates a new modal dialog instance (QDialog or a subclass).
@@ -100,12 +100,12 @@ public:
      so on another call the dialog will be created again.
      The dialog is assigned to the main window,
      and \a objName name is set. */
-    static Q_REQUIRED_RESULT QDialog *createModalDialogInstance(const QString &className,
+    Q_REQUIRED_RESULT static QDialog *createModalDialogInstance(const QString &className,
             const char* dialogClass, KDbMessageHandler *msgHdr,
             const char *objName = nullptr, QMap<QString, QString>* args = nullptr);
 
     /*! Adeded For convenience. */
-    static Q_REQUIRED_RESULT QDialog *createModalDialogInstance(const QString &className,
+    Q_REQUIRED_RESULT static QDialog *createModalDialogInstance(const QString &className,
             KDbMessageHandler *msgHdr, const char *objName = nullptr,
             QMap<QString, QString>* args = nullptr);
 
@@ -134,18 +134,18 @@ protected:
     KexiWindow *findOrCreateKexiWindow(const char *objName);
 
     /*! Reimplement this if your internal part has to return objects. */
-    virtual Q_REQUIRED_RESULT QObject *createObject(const char* objectClass,
+    Q_REQUIRED_RESULT virtual QObject *createObject(const char* objectClass,
                                   QObject * parent, const char * objName = nullptr,
                                   QMap<QString, QString>* args = nullptr);
 
     /*! Reimplement this if your internal part has to return widgets
      or QDialog objects. */
-    virtual Q_REQUIRED_RESULT QWidget *createWidget(const char* widgetClass,
+    Q_REQUIRED_RESULT virtual QWidget *createWidget(const char* widgetClass,
                                   QWidget * parent, const char * objName = nullptr,
                                   QMap<QString, QString>* args = nullptr);
 
     /*! Reimplement this if your internal part has to return a view object. */
-    virtual Q_REQUIRED_RESULT KexiView *createView(QWidget * parent, const char *objName = nullptr);
+    Q_REQUIRED_RESULT virtual KexiView *createView(QWidget * parent, const char *objName = nullptr);
 
     /*! Reimplement this if your internal part has to execute a command \a commandName
      (usually nonvisual). Arguments are put into \a args and the result can be put into the \a args.
diff --git a/src/core/kexipart.h b/src/core/kexipart.h
index 27daa4609..f5e5005bb 100644
--- a/src/core/kexipart.h
+++ b/src/core/kexipart.h
@@ -142,7 +142,7 @@ public:
      This method is called on openInstance() once per dialog.
      Reimplement this to return KexiWindowData subclass instance.
      Default implemention just returns empty KexiWindowData object. */
-    virtual Q_REQUIRED_RESULT KexiWindowData *createWindowData(KexiWindow *window);
+    Q_REQUIRED_RESULT virtual KexiWindowData *createWindowData(KexiWindow *window);
 
     /*! Creates a new view for mode \a viewMode, \a item and \a parent. The view will be
      used inside \a dialog. */
@@ -223,7 +223,7 @@ protected:
      In this case value pointed by @a ownedByWindow is set to false. Default implemenatation returns
      owned KDbObject object (value pointed by @a ownedByWindow is set to true).
      @a ownedByWindow is required. */
-    virtual Q_REQUIRED_RESULT KDbObject *loadSchemaObject(KexiWindow *window, const KDbObject &object,
+    Q_REQUIRED_RESULT virtual KDbObject *loadSchemaObject(KexiWindow *window, const KDbObject &object,
                                         Kexi::ViewMode viewMode, bool *ownedByWindow);
 
     bool loadDataBlock(KexiWindow *window, QString *dataString, const QString& dataID = QString());
diff --git a/src/plugins/reports/KexiDBReportDataSource.h b/src/plugins/reports/KexiDBReportDataSource.h
index 653f89aab..d4f907cc9 100644
--- a/src/plugins/reports/KexiDBReportDataSource.h
+++ b/src/plugins/reports/KexiDBReportDataSource.h
@@ -83,7 +83,7 @@ public:
 
     //Utility Functions
     virtual QStringList dataSourceNames() const override;
-    virtual Q_REQUIRED_RESULT KReportDataSource *create(const QString &source) const override;
+    Q_REQUIRED_RESULT virtual KReportDataSource *create(const QString &source) const override;
 
 private:
     class Private;
diff --git a/src/widget/KexiFileWidgetInterface.h b/src/widget/KexiFileWidgetInterface.h
index 1fc004d84..16c72d26d 100644
--- a/src/widget/KexiFileWidgetInterface.h
+++ b/src/widget/KexiFileWidgetInterface.h
@@ -57,7 +57,7 @@ public:
      *
      * @todo Share this code with KReport and Kexi
      */
-    static Q_REQUIRED_RESULT KexiFileWidgetInterface *createWidget(const QUrl &startDirOrVariable,
+    Q_REQUIRED_RESULT static KexiFileWidgetInterface *createWidget(const QUrl &startDirOrVariable,
                                                  KexiFileFilters::Mode mode,
                                                  const QString &fileName,
                                                  QWidget *parent = nullptr);
@@ -65,7 +65,7 @@ public:
     /**
      * @overload
      */
-    static Q_REQUIRED_RESULT KexiFileWidgetInterface *createWidget(const QUrl &startDirOrVariable,
+    Q_REQUIRED_RESULT static KexiFileWidgetInterface *createWidget(const QUrl &startDirOrVariable,
                                                  KexiFileFilters::Mode mode,
                                                  QWidget *parent = nullptr);
 
-- 
2.35.3