mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
add humanize as a dependency
This commit is contained in:
parent
7c3cd930f3
commit
2305afe700
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -4,3 +4,6 @@
|
||||||
[submodule "lib/settings"]
|
[submodule "lib/settings"]
|
||||||
path = lib/settings
|
path = lib/settings
|
||||||
url = https://github.com/pajlada/settings
|
url = https://github.com/pajlada/settings
|
||||||
|
[submodule "lib/humanize"]
|
||||||
|
path = lib/humanize
|
||||||
|
url = https://github.com/pajlada/humanize.git
|
||||||
|
|
|
@ -195,3 +195,4 @@ werr {
|
||||||
# External dependencies
|
# External dependencies
|
||||||
include(dependencies/rapidjson.pri)
|
include(dependencies/rapidjson.pri)
|
||||||
include(dependencies/settings.pri)
|
include(dependencies/settings.pri)
|
||||||
|
include(dependencies/humanize.pri)
|
||||||
|
|
2
dependencies/humanize.pri
vendored
Normal file
2
dependencies/humanize.pri
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# settings
|
||||||
|
INCLUDEPATH += $$PWD/../lib/humanize/include/
|
1
lib/humanize
Submodule
1
lib/humanize
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 4e00a03623966723f23ca3034c1ad944009cd7be
|
|
@ -33,14 +33,15 @@ void MessageBuilder::appendTimestamp(time_t time)
|
||||||
{
|
{
|
||||||
char timeStampBuffer[69];
|
char timeStampBuffer[69];
|
||||||
|
|
||||||
|
// Add word for timestamp with no seconds
|
||||||
strftime(timeStampBuffer, 69, "%H:%M", localtime(&time));
|
strftime(timeStampBuffer, 69, "%H:%M", localtime(&time));
|
||||||
QString timestamp = QString(timeStampBuffer);
|
QString timestampNoSeconds(timeStampBuffer);
|
||||||
|
appendWord(Word(timestampNoSeconds, Word::TimestampNoSeconds,
|
||||||
strftime(timeStampBuffer, 69, "%H:%M:%S", localtime(&time));
|
|
||||||
QString timestampWithSeconds = QString(timeStampBuffer);
|
|
||||||
|
|
||||||
appendWord(Word(timestamp, Word::TimestampNoSeconds,
|
|
||||||
ColorScheme::getInstance().SystemMessageColor, QString(), QString()));
|
ColorScheme::getInstance().SystemMessageColor, QString(), QString()));
|
||||||
|
|
||||||
|
// Add word for timestamp with seconds
|
||||||
|
strftime(timeStampBuffer, 69, "%H:%M:%S", localtime(&time));
|
||||||
|
QString timestampWithSeconds(timeStampBuffer);
|
||||||
appendWord(Word(timestampWithSeconds, Word::TimestampWithSeconds,
|
appendWord(Word(timestampWithSeconds, Word::TimestampWithSeconds,
|
||||||
ColorScheme::getInstance().SystemMessageColor, QString(), QString()));
|
ColorScheme::getInstance().SystemMessageColor, QString(), QString()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue