diff --git a/Telegram/SourceFiles/_other/genemoji.h b/Telegram/SourceFiles/_other/genemoji.h index 2198d66d61..61c0e3e767 100644 --- a/Telegram/SourceFiles/_other/genemoji.h +++ b/Telegram/SourceFiles/_other/genemoji.h @@ -26,7 +26,6 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include #include -#include #include #include #include diff --git a/Telegram/SourceFiles/_other/genlang.h b/Telegram/SourceFiles/_other/genlang.h index 7f273bb430..dadeb8c09b 100644 --- a/Telegram/SourceFiles/_other/genlang.h +++ b/Telegram/SourceFiles/_other/genlang.h @@ -24,14 +24,12 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include #include -#include #include #include #include #include #include #include -#include using std::string; using std::cout; diff --git a/Telegram/SourceFiles/_other/genstyles.cpp b/Telegram/SourceFiles/_other/genstyles.cpp index 8c775a82a8..709117d522 100644 --- a/Telegram/SourceFiles/_other/genstyles.cpp +++ b/Telegram/SourceFiles/_other/genstyles.cpp @@ -453,7 +453,6 @@ static const int variants[] = { 0, 2, 3, 4 }, variantsCount = sizeof(variants) / static const char *variantNames[] = { "dbisOne", "dbisOneAndQuarter", "dbisOneAndHalf", "dbisTwo" }; static const char *variantPostfixes[] = { "", "_125x", "_150x", "_200x" }; -QPixmap *spriteMax = 0; QImage *variantSprites = 0; int *spriteWidths = 0; QImage *variantGrids = 0; @@ -853,8 +852,7 @@ ScalarValue prepareSprite(int variant, const char *&text, const char *end) { QImage lastCopy = variantSprites[variantsCount - 1].copy(adjustPx(varLast, sprite.x(), true), adjustPx(varLast, sprite.y(), true), adjustPx(varLast, sprite.width(), true), adjustPx(varLast, sprite.height(), true)); for (int i = 1; i < variantsCount - 1; ++i) { QPainter p(&variantSprites[i]); - QPixmap copy = QPixmap::fromImage(lastCopy.scaled(adjustPx(variants[i], sprite.width(), true), adjustPx(variants[i], sprite.height(), true), Qt::IgnoreAspectRatio, Qt::SmoothTransformation), Qt::ColorOnly); - p.drawPixmap(QPoint(adjustPx(variants[i], sprite.x(), true), adjustPx(variants[i], sprite.y(), true)), copy); + p.drawImage(QPoint(adjustPx(variants[i], sprite.x(), true), adjustPx(variants[i], sprite.y(), true)), lastCopy.scaled(adjustPx(variants[i], sprite.width(), true), adjustPx(variants[i], sprite.height(), true), Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); } for (int i = 0; i < variantsCount; ++i) { @@ -1398,9 +1396,6 @@ bool genStyles(const QString &classes_in, const QString &classes_out, const QStr variantSprites[variantsCount - 1] = QImage(spriteLast); spriteWidths[variantsCount - 1] = variantSprites[variantsCount - 1].width(); - QPixmap spriteMaxPix = QPixmap::fromImage(variantSprites[variantsCount - 1], Qt::ColorOnly); - spriteMax = &spriteMaxPix; - if (!variantSprites[0].width() || !variantSprites[0].height()) { cout << "Could not open input sprite file '" << sprite0.toUtf8().constData() << "'!\n"; QCoreApplication::exit(1); diff --git a/Telegram/SourceFiles/_other/genstyles.h b/Telegram/SourceFiles/_other/genstyles.h index ac959eb1bd..40a6d6ce67 100644 --- a/Telegram/SourceFiles/_other/genstyles.h +++ b/Telegram/SourceFiles/_other/genstyles.h @@ -29,7 +29,6 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include #include -#include #include using std::string; diff --git a/Telegram/SourceFiles/_other/msmain.cpp b/Telegram/SourceFiles/_other/msmain.cpp index e9bbff0f9c..cd31683884 100644 --- a/Telegram/SourceFiles/_other/msmain.cpp +++ b/Telegram/SourceFiles/_other/msmain.cpp @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) { #endif QObject *taskImpl = new GenStyles(classes_in, classes_out, styles_in, styles_out, path_to_sprites); - QGuiApplication a(argc, argv); + QCoreApplication a(argc, argv); QObject::connect(taskImpl, SIGNAL(finished()), &a, SLOT(quit())); QTimer::singleShot(0, taskImpl, SLOT(run()));