x += w - pixmap->width();
else if ((flags & Qt::AlignHCenter) == Qt::AlignHCenter)
x += w/2 - pixmap->width()/2;
- else if ((flags & Qt::AlignLeft) != Qt::AlignLeft && QApplication::isRightToLeft())
+ else if ((flags & Qt::AlignLeft) != Qt::AlignLeft && QGuiApplication::isRightToLeft())
x += w - pixmap->width();
result = QRect(x, y, pixmap->width(), pixmap->height());
} else if (!text.isNull() && p) {
x += w - pm.width();
else if ((flags & Qt::AlignHCenter) == Qt::AlignHCenter)
x += w/2 - pm.width()/2;
- else if (((flags & Qt::AlignLeft) != Qt::AlignLeft) && QApplication::isRightToLeft()) // Qt::AlignAuto && rightToLeft
+ else if (((flags & Qt::AlignLeft) != Qt::AlignLeft) && QGuiApplication::isRightToLeft()) // Qt::AlignAuto && rightToLeft
x += w - pm.width();
if (!enabled) {
QFont QTextItem::font() const
{
const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);
- return ti->f ? *ti->f : QApplication::font();
+ return ti->f ? *ti->f : QGuiApplication::font();
}
const qreal underlinePos = pos.y() + qCeil(underlineOffset) - aliasedCoordinateDelta;
if (underlineStyle == QTextCharFormat::SpellCheckUnderline) {
- underlineStyle = QTextCharFormat::UnderlineStyle(QApplication::style()->styleHint(QStyle::SH_SpellCheckUnderlineStyle));
+ underlineStyle = QTextCharFormat::SpellCheckUnderline; // ### Qt5 QTextCharFormat::UnderlineStyle(QApplication::style()->styleHint(QStyle::SH_SpellCheckUnderlineStyle));
}
if (underlineStyle == QTextCharFormat::WaveUnderline) {
wx(0), wy(0), ww(0), wh(0), vx(0), vy(0), vw(0), vh(0),
opacity(1), WxF(false), VxF(false), clipEnabled(true),
bgMode(Qt::TransparentMode), painter(0),
- layoutDirection(QApplication::layoutDirection()),
+ layoutDirection(QGuiApplication::layoutDirection()),
composition_mode(QPainter::CompositionMode_SourceOver),
emulationSpecifier(0), changeFlags(0)
{
clipInfo.clear();
worldMatrix.reset();
matrix.reset();
- layoutDirection = QApplication::layoutDirection();
+ layoutDirection = QGuiApplication::layoutDirection();
composition_mode = QPainter::CompositionMode_SourceOver;
emulationSpecifier = 0;
dirtyFlags = 0;
#include "qprinterinfo.h"
#include "qlist.h"
#include <qpagesetupdialog.h>
-#include <qapplication.h>
+#include <qcoreapplication.h>
#include <qfileinfo.h>
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
#include "private/qcups_p.h"
void QPrinter::init(PrinterMode mode)
{
#if !defined(Q_WS_X11)
- if (!qApp) {
+ if (!QCoreApplication::instance()) {
#else
- if (!qApp || !X11) {
+ if (!QCoreApplication::instance() || !X11) {
#endif
qFatal("QPrinter: Must construct a QApplication before a QPaintDevice");
return;
{
if (window)
window->d_func()->surface = this;
-#if 0
- if (!QApplicationPrivate::runtime_graphics_system) {
- if (setDefaultSurface && window)
- window->setWindowSurface(this);
- }
-#endif
}
/*!
void QWindowSurface::endPaint(const QRegion &)
{
-// QApplication::syncX();
}
#if !defined(Q_WS_QPA)