1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(status): remove Status::getFromString and Status::getIconPixmap

getFromString is unused and incompatible with translated UI names, getIconPixmap is unused and completely generic.
This commit is contained in:
Anthony Bilinski 2019-04-22 02:48:56 -07:00
parent dd007877a9
commit e1876a2691
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 0 additions and 27 deletions

View File

@ -28,13 +28,6 @@
namespace Status
{
QPixmap getIconPixmap(QString path, uint32_t w, uint32_t h)
{
QPixmap pix(w, h);
pix.load(path);
return pix;
}
QString getTitle(Status status)
{
switch (status) {
@ -54,24 +47,6 @@ namespace Status
return QStringLiteral("");
}
Status getFromString(QString status)
{
if (status == QStringLiteral("online"))
return Status::Online;
else if (status == QStringLiteral("away"))
return Status::Away;
else if (status == QStringLiteral("busy"))
return Status::Busy;
else if (status == QStringLiteral("offline"))
return Status::Offline;
else if (status == QStringLiteral("blocked"))
return Status::Blocked;
else {
assert(false);
return Status::Offline;
}
}
QString getIconPath(Status status, bool event)
{
const QString eventSuffix = event ? QStringLiteral("_notification") : QString();

View File

@ -36,9 +36,7 @@ namespace Status
};
QString getIconPath(Status status, bool event = false);
QPixmap getIconPixmap(QString path, uint32_t w, uint32_t h);
QString getTitle(Status status);
Status getFromString(QString status);
}
#endif // STATUS_H