|
|
@ -28,9 +28,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "misc.h" |
|
|
|
#include "misc.h" |
|
|
|
|
|
|
|
|
|
|
|
#include <boost/version.hpp> |
|
|
|
|
|
|
|
#include <libtorrent/version.hpp> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_WIN |
|
|
|
#ifdef Q_OS_WIN |
|
|
|
#include <windows.h> |
|
|
|
#include <windows.h> |
|
|
|
#include <Shlobj.h> |
|
|
|
#include <Shlobj.h> |
|
|
@ -44,7 +41,9 @@ |
|
|
|
#include <CoreServices/CoreServices.h> |
|
|
|
#include <CoreServices/CoreServices.h> |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <boost/version.hpp> |
|
|
|
#include <openssl/opensslv.h> |
|
|
|
#include <openssl/opensslv.h> |
|
|
|
|
|
|
|
#include <libtorrent/version.hpp> |
|
|
|
|
|
|
|
|
|
|
|
#include <QCoreApplication> |
|
|
|
#include <QCoreApplication> |
|
|
|
#include <QRegularExpression> |
|
|
|
#include <QRegularExpression> |
|
|
@ -361,30 +360,6 @@ QString Utils::Misc::getUserIDString() |
|
|
|
return uid; |
|
|
|
return uid; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QStringList Utils::Misc::toStringList(const QList<bool> &l) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QStringList ret; |
|
|
|
|
|
|
|
for (const bool b : l) |
|
|
|
|
|
|
|
ret << (b ? "1" : "0"); |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QList<int> Utils::Misc::intListfromStringList(const QStringList &l) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QList<int> ret; |
|
|
|
|
|
|
|
for (const QString &s : l) |
|
|
|
|
|
|
|
ret << s.toInt(); |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QList<bool> Utils::Misc::boolListfromStringList(const QStringList &l) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QList<bool> ret; |
|
|
|
|
|
|
|
for (const QString &s : l) |
|
|
|
|
|
|
|
ret << (s == "1"); |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString Utils::Misc::parseHtmlLinks(const QString &rawText) |
|
|
|
QString Utils::Misc::parseHtmlLinks(const QString &rawText) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString result = rawText; |
|
|
|
QString result = rawText; |
|
|
|