5656#include < QSettings>
5757#include < QTextDocument> // for Qt::mightBeRichText
5858#include < QThread>
59-
60- #if QT_VERSION < 0x050000
61- #include < QUrl>
62- #else
6359#include < QUrlQuery>
64- #endif
60+ #include < QMouseEvent>
61+
6562
6663#if BOOST_FILESYSTEM_VERSION >= 3
6764static boost::filesystem::detail::utf8_codecvt_facet utf8;
@@ -94,11 +91,7 @@ QString dateTimeStr(qint64 nTime)
9491QFont bitcoinAddressFont ()
9592{
9693 QFont font (" Monospace" );
97- #if QT_VERSION >= 0x040800
9894 font.setStyleHint (QFont::Monospace);
99- #else
100- font.setStyleHint (QFont::TypeWriter);
101- #endif
10295 return font;
10396}
10497
@@ -107,11 +100,9 @@ void setupAddressWidget(QValidatedLineEdit* widget, QWidget* parent)
107100 parent->setFocusProxy (widget);
108101
109102 widget->setFont (bitcoinAddressFont ());
110- #if QT_VERSION >= 0x040700
111103 // We don't want translators to use own addresses in translations
112104 // and this is the only place, where this address is supplied.
113105 widget->setPlaceholderText (QObject::tr (" Enter a PIVX address (e.g. %1)" ).arg (" D7VFR83SQbiezrW72hjcWJtcfip5krte2Z" ));
114- #endif
115106 widget->setValidator (new BitcoinAddressEntryValidator (parent));
116107 widget->setCheckValidator (new BitcoinAddressCheckValidator (parent));
117108}
@@ -139,13 +130,10 @@ bool parseBitcoinURI(const QUrl& uri, SendCoinsRecipient* out)
139130 }
140131 rv.amount = 0 ;
141132
142- #if QT_VERSION < 0x050000
143- QList<QPair<QString, QString> > items = uri.queryItems ();
144- #else
145133 QUrlQuery uriQuery (uri);
146134 QList<QPair<QString, QString> > items = uriQuery.queryItems ();
147- # endif
148- for (QList<QPair<QString, QString> >::iterator i = items. begin (); i != items. end (); i++) {
135+ for (QList<QPair<QString, QString> >::iterator i = items. begin (); i != items. end (); i++)
136+ {
149137 bool fShouldReturnFalse = false ;
150138 if (i->first .startsWith (" req-" )) {
151139 i->first .remove (0 , 4 );
@@ -225,11 +213,7 @@ bool isDust(const QString& address, const CAmount& amount)
225213
226214QString HtmlEscape (const QString& str, bool fMultiLine )
227215{
228- #if QT_VERSION < 0x050000
229- QString escaped = Qt::escape (str);
230- #else
231216 QString escaped = str.toHtmlEscaped ();
232- #endif
233217 escaped = escaped.replace (" " , " " );
234218 if (fMultiLine ) {
235219 escaped = escaped.replace (" \n " , " <br>\n " );
@@ -273,12 +257,10 @@ QString getSaveFileName(QWidget* parent, const QString& caption, const QString&
273257 QString myDir;
274258 if (dir.isEmpty ()) // Default to user documents location
275259 {
276- #if QT_VERSION < 0x050000
277- myDir = QDesktopServices::storageLocation (QDesktopServices::DocumentsLocation);
278- #else
279260 myDir = QStandardPaths::writableLocation (QStandardPaths::DocumentsLocation);
280- #endif
281- } else {
261+ }
262+ else
263+ {
282264 myDir = dir;
283265 }
284266 /* Directly convert path to native OS path separators */
@@ -315,12 +297,10 @@ QString getOpenFileName(QWidget* parent, const QString& caption, const QString&
315297 QString myDir;
316298 if (dir.isEmpty ()) // Default to user documents location
317299 {
318- #if QT_VERSION < 0x050000
319- myDir = QDesktopServices::storageLocation (QDesktopServices::DocumentsLocation);
320- #else
321300 myDir = QStandardPaths::writableLocation (QStandardPaths::DocumentsLocation);
322- #endif
323- } else {
301+ }
302+ else
303+ {
324304 myDir = dir;
325305 }
326306 /* Directly convert path to native OS path separators */
@@ -470,11 +450,7 @@ void TableViewLastColumnResizingFixer::disconnectViewHeadersSignals()
470450// Refactored here for readability.
471451void TableViewLastColumnResizingFixer::setViewHeaderResizeMode (int logicalIndex, QHeaderView::ResizeMode resizeMode)
472452{
473- #if QT_VERSION < 0x050000
474- tableView->horizontalHeader ()->setResizeMode (logicalIndex, resizeMode);
475- #else
476453 tableView->horizontalHeader ()->setSectionResizeMode (logicalIndex, resizeMode);
477- #endif
478454}
479455
480456void TableViewLastColumnResizingFixer::resizeColumn (int nColumnIndex, int width)
0 commit comments