mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
use QApplication::type() to check the application type in QPixmap::init()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
6463eab210
commit
2c8823890b
1 changed files with 1 additions and 3 deletions
|
@ -69,11 +69,9 @@ static inline bool qt_pixmap_thread_test()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern QApplication::Type qt_appType;
|
|
||||||
|
|
||||||
void QPixmap::init(int w, int h, int type)
|
void QPixmap::init(int w, int h, int type)
|
||||||
{
|
{
|
||||||
if (qt_appType == QApplication::Tty) {
|
if (Q_UNLIKELY(QApplication::type() == QApplication::Tty)) {
|
||||||
qWarning("QPixmap: Cannot create a QPixmap when no GUI is being used");
|
qWarning("QPixmap: Cannot create a QPixmap when no GUI is being used");
|
||||||
data = 0;
|
data = 0;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue