Warning, /graphics/digikam/project/bundles/3rdparty/ext_kf5/kio-drop-ktextwidgets.patch is written in an unsupported language. File is not indexed.
0001 diff --git a/autotests/jobtest.h b/autotests/jobtest.h 0002 index 8379a4ab0..d3a885c51 100644 0003 --- a/autotests/jobtest.h 0004 +++ b/autotests/jobtest.h 0005 @@ -21,6 +21,8 @@ class Job; 0006 0007 class KJob; 0008 0009 +#undef stat 0010 + 0011 class JobTest : public QObject 0012 { 0013 Q_OBJECT 0014 diff --git a/src/core/slaveinterface.h b/src/core/slaveinterface.h 0015 index 317a41c08..c6caa7969 100644 0016 --- a/src/core/slaveinterface.h 0017 +++ b/src/core/slaveinterface.h 0018 @@ -19,6 +19,8 @@ 0019 0020 class QUrl; 0021 0022 +#undef open 0023 + 0024 namespace KIO 0025 { 0026 class Connection; 0027 diff --git a/src/filewidgets/kfilewidget.cpp b/src/filewidgets/kfilewidget.cpp 0028 index 172f5764b..27945cf91 100644 0029 --- a/src/filewidgets/kfilewidget.cpp 0030 +++ b/src/filewidgets/kfilewidget.cpp 0031 @@ -286,7 +286,7 @@ public: 0032 bool m_confirmOverwrite = false; 0033 bool m_differentHierarchyLevelItemsEntered = false; 0034 0035 - const std::array<short, 8> m_stdIconSizes = { 0036 + const std::array<short, 8> m_stdIconSizes = {{ 0037 KIconLoader::SizeSmall, 0038 KIconLoader::SizeSmallMedium, 0039 KIconLoader::SizeMedium, 0040 @@ -295,7 +295,7 @@ public: 0041 KIconLoader::SizeEnormous, 0042 256, 0043 512, 0044 - }; 0045 + }}; 0046 0047 QSlider *m_iconSizeSlider = nullptr; 0048 QAction *m_zoomOutAction = nullptr; 0049 diff --git a/src/kcms/netpref/CMakeLists.txt b/src/kcms/netpref/CMakeLists.txt 0050 index b774a5807..ea5c654d8 100644 0051 --- a/src/kcms/netpref/CMakeLists.txt 0052 +++ b/src/kcms/netpref/CMakeLists.txt 0053 @@ -1,4 +1,4 @@ 0054 -find_package(KF5TextWidgets ${KF_DEP_VERSION} REQUIRED) 0055 +#find_package(KF5TextWidgets ${KF_DEP_VERSION} REQUIRED) 0056 0057 add_library(kcm_netpref MODULE) 0058 0059 @@ -14,7 +14,7 @@ target_link_libraries(kcm_netpref 0060 KF5::ConfigCore 0061 KF5::ConfigWidgets 0062 KF5::KIOCore 0063 - KF5::TextWidgets # KPluralHandlingSpinBox 0064 +# KF5::TextWidgets # KPluralHandlingSpinBox 0065 PRIVATE 0066 KF5::I18n 0067 KF5::CoreAddons 0068 diff --git a/src/kcms/netpref/netpref.cpp b/src/kcms/netpref/netpref.cpp 0069 index db08eb32d..b0ca7a119 100644 0070 --- a/src/kcms/netpref/netpref.cpp 0071 +++ b/src/kcms/netpref/netpref.cpp 0072 @@ -12,7 +12,8 @@ 0073 #include <KConfigGroup> 0074 #include <KLocalizedString> 0075 #include <KPluginFactory> 0076 -#include <KPluralHandlingSpinBox> 0077 +#include <QSpinBox> 0078 +//#include <KPluralHandlingSpinBox> 0079 #include <ioworker_defaults.h> 0080 0081 // Local 0082 @@ -41,26 +42,26 @@ KIOPreferences::KIOPreferences(QWidget *parent, const QVariantList &) 0083 mainLayout->addWidget(gb_Timeout); 0084 0085 QFormLayout *timeoutLayout = new QFormLayout(gb_Timeout); 0086 - sb_socketRead = new KPluralHandlingSpinBox(this); 0087 - sb_socketRead->setSuffix(ki18np(" second", " seconds")); 0088 + sb_socketRead = new QSpinBox(this); 0089 + sb_socketRead->setSuffix(ki18np(" second", " seconds").toString()); 0090 connect(sb_socketRead, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged); 0091 timeoutLayout->addRow(i18n("Soc&ket read:"), sb_socketRead); 0092 0093 - sb_proxyConnect = new KPluralHandlingSpinBox(this); 0094 + sb_proxyConnect = new QSpinBox(this); 0095 sb_proxyConnect->setValue(0); 0096 - sb_proxyConnect->setSuffix(ki18np(" second", " seconds")); 0097 + sb_proxyConnect->setSuffix(ki18np(" second", " seconds").toString()); 0098 connect(sb_proxyConnect, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged); 0099 timeoutLayout->addRow(i18n("Pro&xy connect:"), sb_proxyConnect); 0100 0101 - sb_serverConnect = new KPluralHandlingSpinBox(this); 0102 + sb_serverConnect = new QSpinBox(this); 0103 sb_serverConnect->setValue(0); 0104 - sb_serverConnect->setSuffix(ki18np(" second", " seconds")); 0105 + sb_serverConnect->setSuffix(ki18np(" second", " seconds").toString()); 0106 connect(sb_serverConnect, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged); 0107 timeoutLayout->addRow(i18n("Server co&nnect:"), sb_serverConnect); 0108 0109 - sb_serverResponse = new KPluralHandlingSpinBox(this); 0110 + sb_serverResponse = new QSpinBox(this); 0111 sb_serverResponse->setValue(0); 0112 - sb_serverResponse->setSuffix(ki18np(" second", " seconds")); 0113 + sb_serverResponse->setSuffix(ki18np(" second", " seconds").toString()); 0114 connect(sb_serverResponse, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged); 0115 timeoutLayout->addRow(i18n("&Server response:"), sb_serverResponse); 0116 0117 @@ -86,8 +87,8 @@ KIOPreferences::KIOPreferences(QWidget *parent, const QVariantList &) 0118 auto partialLayout = new QFormLayout(partialWidget); 0119 partialLayout->setContentsMargins(20, 0, 0, 0); // indent below mark partial 0120 0121 - sb_globalMinimumKeepSize = new KPluralHandlingSpinBox(this); 0122 - sb_globalMinimumKeepSize->setSuffix(ki18np(" byte", " bytes")); 0123 + sb_globalMinimumKeepSize = new QSpinBox(this); 0124 + sb_globalMinimumKeepSize->setSuffix(ki18np(" byte", " bytes").toString()); 0125 connect(sb_globalMinimumKeepSize, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged); 0126 partialLayout->addRow(i18nc("@label:spinbox", "If cancelled, automatically delete partially uploaded files smaller than:"), sb_globalMinimumKeepSize); 0127 0128 diff --git a/src/kcms/netpref/netpref.h b/src/kcms/netpref/netpref.h 0129 index f260e52db..d7c955878 100644 0130 --- a/src/kcms/netpref/netpref.h 0131 +++ b/src/kcms/netpref/netpref.h 0132 @@ -6,7 +6,7 @@ 0133 class QGroupBox; 0134 class QCheckBox; 0135 0136 -class KPluralHandlingSpinBox; 0137 +class QSpinBox; 0138 0139 class KIOPreferences : public KCModule 0140 { 0141 @@ -32,14 +32,14 @@ private: 0142 QGroupBox *gb_Ftp; 0143 QGroupBox *gb_Timeout; 0144 QCheckBox *cb_globalMarkPartial; 0145 - KPluralHandlingSpinBox *sb_globalMinimumKeepSize; 0146 + QSpinBox *sb_globalMinimumKeepSize; 0147 QCheckBox *cb_ftpEnablePasv; 0148 QCheckBox *cb_ftpMarkPartial; 0149 0150 - KPluralHandlingSpinBox *sb_socketRead; 0151 - KPluralHandlingSpinBox *sb_proxyConnect; 0152 - KPluralHandlingSpinBox *sb_serverConnect; 0153 - KPluralHandlingSpinBox *sb_serverResponse; 0154 + QSpinBox *sb_socketRead; 0155 + QSpinBox *sb_proxyConnect; 0156 + QSpinBox *sb_serverConnect; 0157 + QSpinBox *sb_serverResponse; 0158 }; 0159 0160 #endif // NETPREF_H 0161 diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp 0162 index 92c06a09a..9fb417689 100644 0163 --- a/src/widgets/previewjob.cpp 0164 +++ b/src/widgets/previewjob.cpp 0165 @@ -219,7 +219,7 @@ void PreviewJob::setDefaultDevicePixelRatio(int defaultDevicePixelRatio) 0166 0167 void PreviewJob::setDefaultDevicePixelRatio(qreal defaultDevicePixelRatio) 0168 { 0169 - s_defaultDevicePixelRatio = std::ceil(defaultDevicePixelRatio); 0170 + s_defaultDevicePixelRatio = ceil(defaultDevicePixelRatio); 0171 } 0172 0173 #if KIOWIDGETS_BUILD_DEPRECATED_SINCE(4, 7) 0174 @@ -531,7 +531,7 @@ void KIO::PreviewJob::setDevicePixelRatio(int dpr) 0175 0176 void KIO::PreviewJob::setDevicePixelRatio(qreal dpr) 0177 { 0178 - d_func()->devicePixelRatio = std::ceil(dpr); 0179 + d_func()->devicePixelRatio = ceil(dpr); 0180 } 0181 0182 void PreviewJob::setIgnoreMaximumSize(bool ignoreSize) 0183 diff --git a/src/widgets/renamedialog.cpp b/src/widgets/renamedialog.cpp 0184 index 71e37a483..83f4ede49 100644 0185 --- a/src/widgets/renamedialog.cpp 0186 +++ b/src/widgets/renamedialog.cpp 0187 @@ -427,10 +427,10 @@ RenameDialog::RenameDialog(QWidget *parent, 0188 0189 // check files contents for local files 0190 if ((d->dest.isLocalFile() && !(_options & RenameDialog_DestIsDirectory)) && (d->src.isLocalFile() && !(_options & RenameDialog_SourceIsDirectory))) { 0191 - const CompareFilesResult CompareFilesResult = compareFiles(d->src.toLocalFile(), d->dest.toLocalFile()); 0192 + const CompareFilesResult res = compareFiles(d->src.toLocalFile(), d->dest.toLocalFile()); 0193 0194 QString text; 0195 - switch (CompareFilesResult) { 0196 + switch (res) { 0197 case CompareFilesResult::Identical: 0198 text = i18n("The files are identical."); 0199 break; 0200 @@ -442,7 +442,7 @@ RenameDialog::RenameDialog(QWidget *parent, 0201 break; 0202 } 0203 QLabel *filesIdenticalLabel = createLabel(this, text, true); 0204 - if (CompareFilesResult == CompareFilesResult::PartiallyIdentical) { 0205 + if (res == CompareFilesResult::PartiallyIdentical) { 0206 QLabel *pixmapLabel = new QLabel(this); 0207 pixmapLabel->setPixmap(QIcon::fromTheme(QStringLiteral("help-about")).pixmap(QSize(16, 16))); 0208 pixmapLabel->setToolTip(