summaryrefslogtreecommitdiff
blob: e2157f00fd346bffee767ad82e2fa4c2a27df7c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From 772a4d712abcf1c6c86f25bd306785815132d886 Mon Sep 17 00:00:00 2001
From: Nikolai Krasheninnikov <nkrasheninnikov@yandex.ru>
Date: Tue, 2 Apr 2024 09:07:53 +0000
Subject: [PATCH] svn: Fix gcc-13 One Definition Rule compilation error with
 LTO enabled

columns_t enum defined multiple times in different translation units. Although this
should not be an error, we move the definition to a separate unnamed namespace.

BUG: 482524
---
 svn/svncommitdialog.cpp | 10 +++++-----
 svn/svnlogdialog.cpp    | 14 +++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/svn/svncommitdialog.cpp b/svn/svncommitdialog.cpp
index 41152434..f9a44265 100644
--- a/svn/svncommitdialog.cpp
+++ b/svn/svncommitdialog.cpp
@@ -54,6 +54,11 @@ QStringList makeContext(const QStringList &list, const QHash<QString, KVersionCo
     return ret;
 }
 
+enum columns_t {
+    columnPath,
+    columnStatus
+};
+
 }
 
 struct svnCommitEntryInfo_t {
@@ -67,11 +72,6 @@ struct svnCommitEntryInfo_t {
 };
 Q_DECLARE_METATYPE(svnCommitEntryInfo_t);
 
-enum columns_t {
-    columnPath,
-    columnStatus
-};
-
 SvnCommitDialog::SvnCommitDialog(const QHash<QString, KVersionControlPlugin::ItemVersion> *versionInfo, const QStringList& context, QWidget *parent) :
     QDialog(parent),
     m_versionInfoHash(versionInfo),
diff --git a/svn/svnlogdialog.cpp b/svn/svnlogdialog.cpp
index 21abadaa..685f7ec5 100644
--- a/svn/svnlogdialog.cpp
+++ b/svn/svnlogdialog.cpp
@@ -49,6 +49,13 @@ bool resetAndRevertFileToRevision(const QString &filePath, ulong revision)
     return true;
 }
 
+enum columns_t {
+    columnRevision,
+    columnAuthor,
+    columnDate,
+    columnMessage
+};
+
 }
 
 struct svnLogEntryInfo_t {
@@ -64,13 +71,6 @@ struct svnLogEntryInfo_t {
 };
 Q_DECLARE_METATYPE(svnLogEntryInfo_t);
 
-enum columns_t {
-    columnRevision,
-    columnAuthor,
-    columnDate,
-    columnMessage
-};
-
 SvnLogDialog::SvnLogDialog(const QString& contextDir, QWidget *parent) :
     QDialog(parent),
     m_contextDir(contextDir),
-- 
GitLab