Initially done with PR

This commit is contained in:
apa420 2018-08-26 13:49:15 +02:00
parent 8ea3b6c8ee
commit 15bcb5a2fb
4 changed files with 3 additions and 20 deletions

View file

@ -20,7 +20,6 @@ void DownloadManager::setFile(QString fileURL, const QString &channelName)
QString filePath = fileURL;
QString saveFilePath;
QStringList filePathList = filePath.split('/');
// QString fileName = filePathList.at(filePathList.count() - 1);
saveFilePath = QString(
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) +
"2/cache/profileAvatars/twitch/" + channelName + ".png");

View file

@ -15,7 +15,7 @@ class DownloadManager : public QObject
{
Q_OBJECT
public:
explicit DownloadManager(QObject *parent = 0);
explicit DownloadManager(QObject *parent = nullptr);
virtual ~DownloadManager();
void setFile(QString fileURL, const QString &channelName);

View file

@ -115,12 +115,8 @@ void Toasts::sendWindowsNotification(const QString &channelName, Platform p)
WinToastLib::WinToastTemplate::SecondLine);
QString Path;
if (p == Platform::Twitch) {
Path =
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) +
"2/cache/profileAvatars/twitch/" + channelName + ".png";
// Change it to this below v
// Path = getApp()->paths->cacheDirectory() + "profileAvatars/twitch/" +
// channelName + ".png";
Path = getApp()->paths->cacheDirectory() + "/" +
"profileAvatars/twitch/" + channelName + ".png";
}
std::string temp_Utf8 = Path.toUtf8().constData();
std::wstring imagePath = std::wstring(temp_Utf8.begin(), temp_Utf8.end());

View file

@ -559,18 +559,6 @@ void ChannelView::setChannel(ChannelPtr newChannel)
if (tc != nullptr) {
tc->tabHighlightRequested.connect([this](HighlightState state) {
this->tabHighlightRequested.invoke(HighlightState::Notification);
/*
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing, true);
painter.translate(2, 2);
painter.setPen(QColor("#6441A4"));
painter.drawEllipse(QRectF(10, 10, 5, 5));
*/
QPainter painter(this);
auto radius = 10;
painter.setPen(QColor("#6441A4"));
painter.drawEllipse(this->rect().center(), radius, radius);
});
}
}