Debian Codegraph @

project/bundles/3rdparty/ext_kf5/kio-drop-ktextwidgets.patch

raw
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 242026a93..8820448f4 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -192,7 +192,7 @@ if(BUILD_TESTING)
6 endif()
7
8 add_subdirectory(kconf_update)
9 -add_subdirectory(templates)
10 +#add_subdirectory(templates)
11
12 # create a Config.cmake and a ConfigVersion.cmake file and install them
13 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5KIO")
14 diff --git a/autotests/jobtest.h b/autotests/jobtest.h
15 index 8379a4ab0..d3a885c51 100644
16 --- a/autotests/jobtest.h
17 +++ b/autotests/jobtest.h
18 @@ -21,6 +21,8 @@ class Job;
19
20 class KJob;
21
22 +#undef stat
23 +
24 class JobTest : public QObject
25 {
26 Q_OBJECT
27 diff --git a/src/core/slaveinterface.h b/src/core/slaveinterface.h
28 index 317a41c08..c6caa7969 100644
29 --- a/src/core/slaveinterface.h
30 +++ b/src/core/slaveinterface.h
31 @@ -19,6 +19,8 @@
32
33 class QUrl;
34
35 +#undef open
36 +
37 namespace KIO
38 {
39 class Connection;
40 diff --git a/src/filewidgets/kfilewidget.cpp b/src/filewidgets/kfilewidget.cpp
41 index 85f7a444e..b1f845c71 100644
42 --- a/src/filewidgets/kfilewidget.cpp
43 +++ b/src/filewidgets/kfilewidget.cpp
44 @@ -285,7 +285,7 @@ public:
45 bool m_confirmOverwrite = false;
46 bool m_differentHierarchyLevelItemsEntered = false;
47
48 - const std::array<short, 8> m_stdIconSizes = {
49 + const std::array<short, 8> m_stdIconSizes = {{
50 KIconLoader::SizeSmall,
51 KIconLoader::SizeSmallMedium,
52 KIconLoader::SizeMedium,
53 @@ -294,7 +294,7 @@ public:
54 KIconLoader::SizeEnormous,
55 256,
56 512,
57 - };
58 + }};
59
60 QSlider *m_iconSizeSlider = nullptr;
61 QAction *m_zoomOutAction = nullptr;
62 diff --git a/src/kcms/netpref/CMakeLists.txt b/src/kcms/netpref/CMakeLists.txt
63 index b774a5807..ea5c654d8 100644
64 --- a/src/kcms/netpref/CMakeLists.txt
65 +++ b/src/kcms/netpref/CMakeLists.txt
66 @@ -1,4 +1,4 @@
67 -find_package(KF5TextWidgets ${KF_DEP_VERSION} REQUIRED)
68 +#find_package(KF5TextWidgets ${KF_DEP_VERSION} REQUIRED)
69
70 add_library(kcm_netpref MODULE)
71
72 @@ -14,7 +14,7 @@ target_link_libraries(kcm_netpref
73 KF5::ConfigCore
74 KF5::ConfigWidgets
75 KF5::KIOCore
76 - KF5::TextWidgets # KPluralHandlingSpinBox
77 +# KF5::TextWidgets # KPluralHandlingSpinBox
78 PRIVATE
79 KF5::I18n
80 KF5::CoreAddons
81 diff --git a/src/kcms/netpref/netpref.cpp b/src/kcms/netpref/netpref.cpp
82 index 7da34b969..236989cdc 100644
83 --- a/src/kcms/netpref/netpref.cpp
84 +++ b/src/kcms/netpref/netpref.cpp
85 @@ -12,7 +12,8 @@
86 #include <KConfigGroup>
87 #include <KLocalizedString>
88 #include <KPluginFactory>
89 -#include <KPluralHandlingSpinBox>
90 +#include <QSpinBox>
91 +//#include <KPluralHandlingSpinBox>
92 #include <ioworker_defaults.h>
93
94 // Local
95 @@ -41,26 +42,26 @@ KIOPreferences::KIOPreferences(QWidget *parent, const QVariantList &)
96 mainLayout->addWidget(gb_Timeout);
97
98 QFormLayout *timeoutLayout = new QFormLayout(gb_Timeout);
99 - sb_socketRead = new KPluralHandlingSpinBox(this);
100 - sb_socketRead->setSuffix(ki18np(" second", " seconds"));
101 + sb_socketRead = new QSpinBox(this);
102 + sb_socketRead->setSuffix(ki18np(" second", " seconds").toString());
103 connect(sb_socketRead, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
104 timeoutLayout->addRow(i18n("Soc&ket read:"), sb_socketRead);
105
106 - sb_proxyConnect = new KPluralHandlingSpinBox(this);
107 + sb_proxyConnect = new QSpinBox(this);
108 sb_proxyConnect->setValue(0);
109 - sb_proxyConnect->setSuffix(ki18np(" second", " seconds"));
110 + sb_proxyConnect->setSuffix(ki18np(" second", " seconds").toString());
111 connect(sb_proxyConnect, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
112 timeoutLayout->addRow(i18n("Pro&xy connect:"), sb_proxyConnect);
113
114 - sb_serverConnect = new KPluralHandlingSpinBox(this);
115 + sb_serverConnect = new QSpinBox(this);
116 sb_serverConnect->setValue(0);
117 - sb_serverConnect->setSuffix(ki18np(" second", " seconds"));
118 + sb_serverConnect->setSuffix(ki18np(" second", " seconds").toString());
119 connect(sb_serverConnect, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
120 timeoutLayout->addRow(i18n("Server co&nnect:"), sb_serverConnect);
121
122 - sb_serverResponse = new KPluralHandlingSpinBox(this);
123 + sb_serverResponse = new QSpinBox(this);
124 sb_serverResponse->setValue(0);
125 - sb_serverResponse->setSuffix(ki18np(" second", " seconds"));
126 + sb_serverResponse->setSuffix(ki18np(" second", " seconds").toString());
127 connect(sb_serverResponse, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
128 timeoutLayout->addRow(i18n("&Server response:"), sb_serverResponse);
129
130 @@ -86,8 +87,8 @@ KIOPreferences::KIOPreferences(QWidget *parent, const QVariantList &)
131 auto partialLayout = new QFormLayout(partialWidget);
132 partialLayout->setContentsMargins(20, 0, 0, 0); // indent below mark partial
133
134 - sb_globalMinimumKeepSize = new KPluralHandlingSpinBox(this);
135 - sb_globalMinimumKeepSize->setSuffix(ki18np(" byte", " bytes"));
136 + sb_globalMinimumKeepSize = new QSpinBox(this);
137 + sb_globalMinimumKeepSize->setSuffix(ki18np(" byte", " bytes").toString());
138 connect(sb_globalMinimumKeepSize, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
139 partialLayout->addRow(i18nc("@label:spinbox", "If cancelled, automatically delete partially uploaded files smaller than:"), sb_globalMinimumKeepSize);
140
141 diff --git a/src/kcms/netpref/netpref.h b/src/kcms/netpref/netpref.h
142 index f260e52db..d7c955878 100644
143 --- a/src/kcms/netpref/netpref.h
144 +++ b/src/kcms/netpref/netpref.h
145 @@ -6,7 +6,7 @@
146 class QGroupBox;
147 class QCheckBox;
148
149 -class KPluralHandlingSpinBox;
150 +class QSpinBox;
151
152 class KIOPreferences : public KCModule
153 {
154 @@ -32,14 +32,14 @@ private:
155 QGroupBox *gb_Ftp;
156 QGroupBox *gb_Timeout;
157 QCheckBox *cb_globalMarkPartial;
158 - KPluralHandlingSpinBox *sb_globalMinimumKeepSize;
159 + QSpinBox *sb_globalMinimumKeepSize;
160 QCheckBox *cb_ftpEnablePasv;
161 QCheckBox *cb_ftpMarkPartial;
162
163 - KPluralHandlingSpinBox *sb_socketRead;
164 - KPluralHandlingSpinBox *sb_proxyConnect;
165 - KPluralHandlingSpinBox *sb_serverConnect;
166 - KPluralHandlingSpinBox *sb_serverResponse;
167 + QSpinBox *sb_socketRead;
168 + QSpinBox *sb_proxyConnect;
169 + QSpinBox *sb_serverConnect;
170 + QSpinBox *sb_serverResponse;
171 };
172
173 #endif // NETPREF_H
174 diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp
175 index 214e3b3b3..a908d2292 100644
176 --- a/src/widgets/previewjob.cpp
177 +++ b/src/widgets/previewjob.cpp
178 @@ -223,7 +223,7 @@ void PreviewJob::setDefaultDevicePixelRatio(int defaultDevicePixelRatio)
179
180 void PreviewJob::setDefaultDevicePixelRatio(qreal defaultDevicePixelRatio)
181 {
182 - s_defaultDevicePixelRatio = std::ceil(defaultDevicePixelRatio);
183 + s_defaultDevicePixelRatio = ceil(defaultDevicePixelRatio);
184 }
185
186 #if KIOWIDGETS_BUILD_DEPRECATED_SINCE(4, 7)
187 @@ -535,7 +535,7 @@ void KIO::PreviewJob::setDevicePixelRatio(int dpr)
188
189 void KIO::PreviewJob::setDevicePixelRatio(qreal dpr)
190 {
191 - d_func()->devicePixelRatio = std::ceil(dpr);
192 + d_func()->devicePixelRatio = ceil(dpr);
193 }
194
195 void PreviewJob::setIgnoreMaximumSize(bool ignoreSize)
196 diff --git a/src/widgets/renamedialog.cpp b/src/widgets/renamedialog.cpp
197 index 43e37ed1d..8a8b44ed7 100644
198 --- a/src/widgets/renamedialog.cpp
199 +++ b/src/widgets/renamedialog.cpp
200 @@ -427,10 +427,10 @@ RenameDialog::RenameDialog(QWidget *parent,
201
202 // check files contents for local files
203 if ((d->dest.isLocalFile() && !(_options & RenameDialog_DestIsDirectory)) && (d->src.isLocalFile() && !(_options & RenameDialog_SourceIsDirectory))) {
204 - const CompareFilesResult CompareFilesResult = compareFiles(d->src.toLocalFile(), d->dest.toLocalFile());
205 + const CompareFilesResult res = compareFiles(d->src.toLocalFile(), d->dest.toLocalFile());
206
207 QString text;
208 - switch (CompareFilesResult) {
209 + switch (res) {
210 case CompareFilesResult::Identical:
211 text = i18n("The files are identical.");
212 break;
213 @@ -442,7 +442,7 @@ RenameDialog::RenameDialog(QWidget *parent,
214 break;
215 }
216 QLabel *filesIdenticalLabel = createLabel(this, text, true);
217 - if (CompareFilesResult == CompareFilesResult::PartiallyIdentical) {
218 + if (res == CompareFilesResult::PartiallyIdentical) {
219 QLabel *pixmapLabel = new QLabel(this);
220 pixmapLabel->setPixmap(QIcon::fromTheme(QStringLiteral("help-about")).pixmap(QSize(16, 16)));
221 pixmapLabel->setToolTip(