refactor: some Application & style things (#5561)
This commit is contained in:
@@ -48,7 +48,7 @@ QString formatTime(int totalSeconds)
|
||||
return res;
|
||||
}
|
||||
|
||||
QString formatTime(QString totalSecondsString)
|
||||
QString formatTime(const QString &totalSecondsString)
|
||||
{
|
||||
bool ok = true;
|
||||
int totalSeconds(totalSecondsString.toInt(&ok));
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace chatterino {
|
||||
|
||||
// format: 1h 23m 42s
|
||||
QString formatTime(int totalSeconds);
|
||||
QString formatTime(QString totalSecondsString);
|
||||
QString formatTime(const QString &totalSecondsString);
|
||||
QString formatTime(std::chrono::seconds totalSeconds);
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace chatterino {
|
||||
// https://stackoverflow.com/questions/21646467/how-to-execute-a-functor-or-a-lambda-in-a-given-thread-in-qt-gcd-style
|
||||
// Qt 5/4 - preferred, has least allocations
|
||||
template <typename F>
|
||||
static void postToThread(F &&fun, QObject *obj = qApp)
|
||||
static void postToThread(F &&fun, QObject *obj = QCoreApplication::instance())
|
||||
{
|
||||
struct Event : public QEvent {
|
||||
using Fun = typename std::decay<F>::type;
|
||||
|
||||
Reference in New Issue
Block a user