@@ -300,7 +300,7 @@ namespace GUIUtil
300300 /* *
301301 * Returns the distance in pixels appropriate for drawing a subsequent character after text.
302302 *
303- * In Qt 5.12 and before the QFontMetrics::width() is used and it is deprecated since Qt 13.0 .
303+ * In Qt 5.12 and before the QFontMetrics::width() is used and it is deprecated since Qt 5.13 .
304304 * In Qt 5.11 the QFontMetrics::horizontalAdvance() was introduced.
305305 */
306306 int TextWidth (const QFontMetrics& fm, const QString& text);
@@ -314,6 +314,44 @@ namespace GUIUtil
314314 * Call QMenu::popup() only on supported QT_QPA_PLATFORM.
315315 */
316316 void PopupMenu (QMenu* menu, const QPoint& point, QAction* at_action = nullptr );
317+
318+ /* *
319+ * Returns the start-moment of the day in local time.
320+ *
321+ * QDateTime::QDateTime(const QDate& date) is deprecated since Qt 5.15.
322+ * QDate::startOfDay() was introduced in Qt 5.14.
323+ */
324+ QDateTime StartOfDay (const QDate& date);
325+
326+ /* *
327+ * Returns true if pixmap has been set.
328+ *
329+ * QPixmap* QLabel::pixmap() is deprecated since Qt 5.15.
330+ */
331+ bool HasPixmap (const QLabel* label);
332+ QImage GetImage (const QLabel* label);
333+
334+ /* *
335+ * Splits the string into substrings wherever separator occurs, and returns
336+ * the list of those strings. Empty strings do not appear in the result.
337+ *
338+ * QString::split() signature differs in different Qt versions:
339+ * - QString::SplitBehavior is deprecated since Qt 5.15
340+ * - Qt::SplitBehavior was introduced in Qt 5.14
341+ * If {QString|Qt}::SkipEmptyParts behavior is required, use this
342+ * function instead of QString::split().
343+ */
344+ template <typename SeparatorType>
345+ QStringList SplitSkipEmptyParts (const QString& string, const SeparatorType& separator)
346+ {
347+ #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
348+ return string.split (separator, Qt::SkipEmptyParts);
349+ #else
350+ return string.split (separator, QString::SkipEmptyParts);
351+ #endif
352+ }
353+
354+
317355} // namespace GUIUtil
318356
319357#endif // BITCOIN_QT_GUIUTIL_H
0 commit comments