[frameworks/kcompletion] src: KCompletionBase/KCompletionMatches: move Q_DECLARE_PRIVATE to PRIVATE

Rick Calixte <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 29d22ef0f385abe5a228a7b6420c792a682eedb1 by Rick Calixte.
Committed on 05/08/2026 at 22:55.
Pushed by aacid into branch 'master'.

KCompletionBase/KCompletionMatches: move Q_DECLARE_PRIVATE to PRIVATE

Not breaking BIC or SC, as Q_DECLARE_PRIVATE defines only inline
methods, which only return pointers to forward-declared internal types,
which no-one external has a reason to use.

M  +1    -1    src/kcompletionbase.h
M  +1    -1    src/kcompletionmatches.h

https://invent.kde.org/frameworks/kcompletion/-/commit/29d22ef0f385abe5a228a7b6420c792a682eedb1

diff --git a/src/kcompletionbase.h b/src/kcompletionbase.h
index f4ce5df..73d4a7e 100644
--- a/src/kcompletionbase.h
+++ b/src/kcompletionbase.h
@@ -34,7 +34,6 @@ class KCompletionBasePrivate;
 class KCOMPLETION_EXPORT KCompletionBase
 {
 public:
-    Q_DECLARE_PRIVATE(KCompletionBase)
     /*!
      * Constants that represent the items whose shortcut
      * key binding is programmable. The default key bindings
@@ -329,6 +328,7 @@ protected:
     virtual void virtual_hook(int id, void *data);
 
 private:
+    Q_DECLARE_PRIVATE(KCompletionBase)
     Q_DISABLE_COPY(KCompletionBase)
     std::unique_ptr<KCompletionBasePrivate> const d_ptr;
 };
diff --git a/src/kcompletionmatches.h b/src/kcompletionmatches.h
index 920cfee..61c62dc 100644
--- a/src/kcompletionmatches.h
+++ b/src/kcompletionmatches.h
@@ -47,7 +47,6 @@ typedef KSortableList<QString> KCompletionMatchesList;
 class KCOMPLETION_EXPORT KCompletionMatches : public KCompletionMatchesList
 {
 public:
-    Q_DECLARE_PRIVATE(KCompletionMatches)
     /*!
      * Default constructor.
      *
@@ -89,6 +88,7 @@ public:
     bool sorting() const;
 
 private:
+    Q_DECLARE_PRIVATE(KCompletionMatches)
     std::unique_ptr<KCompletionMatchesPrivate> const d_ptr;
 };
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.