Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ic062a5bd62621877b17cc0d47303b3c879241385
This commit is contained in:
commit
563dc21c51
@ -11,6 +11,12 @@ dita.metadata.default.audience = programmer
|
|||||||
navigation.homepage = index.html
|
navigation.homepage = index.html
|
||||||
navigation.hometitle = "Qt $QT_VER"
|
navigation.hometitle = "Qt $QT_VER"
|
||||||
|
|
||||||
|
#Words to ignore for auto-linking
|
||||||
|
ignorewords += \
|
||||||
|
macOS \
|
||||||
|
WebChannel \
|
||||||
|
OpenGL
|
||||||
|
|
||||||
sourcedirs += includes $$BUILDDIR
|
sourcedirs += includes $$BUILDDIR
|
||||||
|
|
||||||
url = http://doc.qt.io/qt-5
|
url = http://doc.qt.io/qt-5
|
||||||
|
@ -1865,7 +1865,20 @@ bool QGuiApplication::event(QEvent *e)
|
|||||||
{
|
{
|
||||||
if(e->type() == QEvent::LanguageChange) {
|
if(e->type() == QEvent::LanguageChange) {
|
||||||
setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight);
|
setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight);
|
||||||
|
} else if (e->type() == QEvent::Quit) {
|
||||||
|
// Close open windows. This is done in order to deliver de-expose
|
||||||
|
// events while the event loop is still running.
|
||||||
|
for (QWindow *topLevelWindow : QGuiApplication::topLevelWindows()) {
|
||||||
|
// Already closed windows will not have a platform window, skip those
|
||||||
|
if (!topLevelWindow->handle())
|
||||||
|
continue;
|
||||||
|
if (!topLevelWindow->close()) {
|
||||||
|
e->ignore();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return QCoreApplication::event(e);
|
return QCoreApplication::event(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1942,6 +1955,9 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv
|
|||||||
QWindowSystemInterfacePrivate::ApplicationStateChangedEvent * changeEvent = static_cast<QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *>(e);
|
QWindowSystemInterfacePrivate::ApplicationStateChangedEvent * changeEvent = static_cast<QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *>(e);
|
||||||
QGuiApplicationPrivate::setApplicationState(changeEvent->newState, changeEvent->forcePropagate); }
|
QGuiApplicationPrivate::setApplicationState(changeEvent->newState, changeEvent->forcePropagate); }
|
||||||
break;
|
break;
|
||||||
|
case QWindowSystemInterfacePrivate::ApplicationTermination:
|
||||||
|
QGuiApplicationPrivate::processApplicationTermination(e);
|
||||||
|
break;
|
||||||
case QWindowSystemInterfacePrivate::FlushEvents: {
|
case QWindowSystemInterfacePrivate::FlushEvents: {
|
||||||
QWindowSystemInterfacePrivate::FlushEventsEvent *flushEventsEvent = static_cast<QWindowSystemInterfacePrivate::FlushEventsEvent *>(e);
|
QWindowSystemInterfacePrivate::FlushEventsEvent *flushEventsEvent = static_cast<QWindowSystemInterfacePrivate::FlushEventsEvent *>(e);
|
||||||
QWindowSystemInterface::deferredFlushWindowSystemEvents(flushEventsEvent->flags); }
|
QWindowSystemInterface::deferredFlushWindowSystemEvents(flushEventsEvent->flags); }
|
||||||
@ -3491,6 +3507,13 @@ bool QGuiApplicationPrivate::tryCloseRemainingWindows(QWindowList processedWindo
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QGuiApplicationPrivate::processApplicationTermination(QWindowSystemInterfacePrivate::WindowSystemEvent *windowSystemEvent)
|
||||||
|
{
|
||||||
|
QEvent event(QEvent::Quit);
|
||||||
|
QGuiApplication::sendSpontaneousEvent(QGuiApplication::instance(), &event);
|
||||||
|
windowSystemEvent->eventAccepted = event.isAccepted();
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\since 5.2
|
\since 5.2
|
||||||
\fn Qt::ApplicationState QGuiApplication::applicationState()
|
\fn Qt::ApplicationState QGuiApplication::applicationState()
|
||||||
|
@ -141,6 +141,8 @@ public:
|
|||||||
|
|
||||||
static void processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e);
|
static void processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e);
|
||||||
|
|
||||||
|
static void processApplicationTermination(QWindowSystemInterfacePrivate::WindowSystemEvent *e);
|
||||||
|
|
||||||
static void updateFilteredScreenOrientation(QScreen *screen);
|
static void updateFilteredScreenOrientation(QScreen *screen);
|
||||||
static void reportScreenOrientationChange(QScreen *screen);
|
static void reportScreenOrientationChange(QScreen *screen);
|
||||||
static void processScreenOrientationChange(QWindowSystemInterfacePrivate::ScreenOrientationEvent *e);
|
static void processScreenOrientationChange(QWindowSystemInterfacePrivate::ScreenOrientationEvent *e);
|
||||||
|
@ -285,6 +285,12 @@ QT_DEFINE_QPA_EVENT_HANDLER(void, handleApplicationStateChanged, Qt::Application
|
|||||||
QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
|
QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QT_DEFINE_QPA_EVENT_HANDLER(bool, handleApplicationTermination)
|
||||||
|
{
|
||||||
|
auto *e = new QWindowSystemInterfacePrivate::WindowSystemEvent(QWindowSystemInterfacePrivate::ApplicationTermination);
|
||||||
|
return QWindowSystemInterfacePrivate::handleWindowSystemEvent<Delivery>(e);
|
||||||
|
}
|
||||||
|
|
||||||
QWindowSystemInterfacePrivate::GeometryChangeEvent::GeometryChangeEvent(QWindow *window, const QRect &newGeometry)
|
QWindowSystemInterfacePrivate::GeometryChangeEvent::GeometryChangeEvent(QWindow *window, const QRect &newGeometry)
|
||||||
: WindowSystemEvent(GeometryChange)
|
: WindowSystemEvent(GeometryChange)
|
||||||
, window(window)
|
, window(window)
|
||||||
|
@ -215,6 +215,9 @@ public:
|
|||||||
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
|
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
|
||||||
static void handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate = false);
|
static void handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate = false);
|
||||||
|
|
||||||
|
template<typename Delivery = QWindowSystemInterface::DefaultDelivery>
|
||||||
|
static bool handleApplicationTermination();
|
||||||
|
|
||||||
#if QT_CONFIG(draganddrop)
|
#if QT_CONFIG(draganddrop)
|
||||||
#if QT_DEPRECATED_SINCE(5, 11)
|
#if QT_DEPRECATED_SINCE(5, 11)
|
||||||
QT_DEPRECATED static QPlatformDragQtResponse handleDrag(QWindow *window, const QMimeData *dropData,
|
QT_DEPRECATED static QPlatformDragQtResponse handleDrag(QWindow *window, const QMimeData *dropData,
|
||||||
|
@ -99,7 +99,8 @@ public:
|
|||||||
ApplicationStateChanged = 0x19,
|
ApplicationStateChanged = 0x19,
|
||||||
FlushEvents = 0x20,
|
FlushEvents = 0x20,
|
||||||
WindowScreenChanged = 0x21,
|
WindowScreenChanged = 0x21,
|
||||||
SafeAreaMarginsChanged = 0x22
|
SafeAreaMarginsChanged = 0x22,
|
||||||
|
ApplicationTermination = 0x23
|
||||||
};
|
};
|
||||||
|
|
||||||
class WindowSystemEvent {
|
class WindowSystemEvent {
|
||||||
|
@ -3518,14 +3518,36 @@ QRhiResource::Type QRhiSwapChain::resourceType() const
|
|||||||
\c{currentPixelSize() != surfacePixelSize()} then the swapchain needs to be
|
\c{currentPixelSize() != surfacePixelSize()} then the swapchain needs to be
|
||||||
resized.
|
resized.
|
||||||
|
|
||||||
|
\note Typical rendering logic will call this function to get the output
|
||||||
|
size when starting to prepare a new frame, and base dependent calculations
|
||||||
|
(such as, the viewport) on the size returned from this function.
|
||||||
|
|
||||||
|
While in many cases the value is the same as \c{QWindow::size() *
|
||||||
|
QWindow::devicePixelRatio()}, relying on the QWindow-reported size is not
|
||||||
|
guaranteed to be correct on all platforms and graphics API implementations.
|
||||||
|
Using this function is therefore strongly recommended whenever there is a
|
||||||
|
need to identify the dimensions, in pixels, of the output layer or surface.
|
||||||
|
|
||||||
|
This also has the added benefit of avoiding potential data races when QRhi
|
||||||
|
is used on a dedicated rendering thread, because the need to call QWindow
|
||||||
|
functions, that may then access data updated on the main thread, is
|
||||||
|
avoided.
|
||||||
|
|
||||||
\sa surfacePixelSize()
|
\sa surfacePixelSize()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QSize QRhiSwapChain::surfacePixelSize()
|
\fn QSize QRhiSwapChain::surfacePixelSize()
|
||||||
|
|
||||||
\return The size of the window's associated surface or layer. Do not assume
|
\return The size of the window's associated surface or layer.
|
||||||
this is the same as QWindow::size() * QWindow::devicePixelRatio().
|
|
||||||
|
\warning Do not assume this is the same as \c{QWindow::size() *
|
||||||
|
QWindow::devicePixelRatio()}. With some graphics APIs and windowing system
|
||||||
|
interfaces (for example, Vulkan) there is a theoretical possibility for a
|
||||||
|
surface to assume a size different from the associated window. To support
|
||||||
|
these cases, rendering logic must always base size-derived calculations
|
||||||
|
(such as, viewports) on the size reported from QRhiSwapChain, and never on
|
||||||
|
the size queried from QWindow.
|
||||||
|
|
||||||
\note Can also be called before buildOrResize(), if at least window() is
|
\note Can also be called before buildOrResize(), if at least window() is
|
||||||
already set) This in combination with currentPixelSize() allows to detect
|
already set) This in combination with currentPixelSize() allows to detect
|
||||||
|
@ -2125,22 +2125,7 @@ void QTextEngine::itemize() const
|
|||||||
}
|
}
|
||||||
#if QT_CONFIG(harfbuzz)
|
#if QT_CONFIG(harfbuzz)
|
||||||
analysis = scriptAnalysis.data();
|
analysis = scriptAnalysis.data();
|
||||||
if (qt_useHarfbuzzNG()) {
|
if (!qt_useHarfbuzzNG()) {
|
||||||
// ### pretend HB-old behavior for now
|
|
||||||
for (int i = 0; i < length; ++i) {
|
|
||||||
switch (analysis[i].script) {
|
|
||||||
case QChar::Script_Latin:
|
|
||||||
case QChar::Script_Hiragana:
|
|
||||||
case QChar::Script_Katakana:
|
|
||||||
case QChar::Script_Bopomofo:
|
|
||||||
case QChar::Script_Han:
|
|
||||||
analysis[i].script = QChar::Script_Common;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (int i = 0; i < length; ++i)
|
for (int i = 0; i < length; ++i)
|
||||||
analysis[i].script = hbscript_to_script(script_to_hbscript(analysis[i].script));
|
analysis[i].script = hbscript_to_script(script_to_hbscript(analysis[i].script));
|
||||||
}
|
}
|
||||||
@ -3619,7 +3604,12 @@ int QTextEngine::positionInLigature(const QScriptItem *si, int end,
|
|||||||
int clusterLength = 0;
|
int clusterLength = 0;
|
||||||
|
|
||||||
if (si->analysis.script != QChar::Script_Common &&
|
if (si->analysis.script != QChar::Script_Common &&
|
||||||
si->analysis.script != QChar::Script_Greek) {
|
si->analysis.script != QChar::Script_Greek &&
|
||||||
|
si->analysis.script != QChar::Script_Latin &&
|
||||||
|
si->analysis.script != QChar::Script_Hiragana &&
|
||||||
|
si->analysis.script != QChar::Script_Katakana &&
|
||||||
|
si->analysis.script != QChar::Script_Bopomofo &&
|
||||||
|
si->analysis.script != QChar::Script_Han) {
|
||||||
if (glyph_pos == -1)
|
if (glyph_pos == -1)
|
||||||
return si->position + end;
|
return si->position + end;
|
||||||
else {
|
else {
|
||||||
|
@ -88,10 +88,13 @@
|
|||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
#include <qwindowdefs.h>
|
#include <qwindowdefs.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
Q_LOGGING_CATEGORY(lcQpaApplication, "qt.qpa.application");
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
@implementation QCocoaApplicationDelegate {
|
@implementation QCocoaApplicationDelegate {
|
||||||
bool startedQuit;
|
|
||||||
NSObject <NSApplicationDelegate> *reflectionDelegate;
|
NSObject <NSApplicationDelegate> *reflectionDelegate;
|
||||||
bool inLaunch;
|
bool inLaunch;
|
||||||
}
|
}
|
||||||
@ -140,46 +143,30 @@ QT_USE_NAMESPACE
|
|||||||
return [[self.dockMenu retain] autorelease];
|
return [[self.dockMenu retain] autorelease];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)canQuit
|
|
||||||
{
|
|
||||||
QCloseEvent ev;
|
|
||||||
QGuiApplication::sendEvent(qGuiApp, &ev);
|
|
||||||
return ev.isAccepted();
|
|
||||||
}
|
|
||||||
|
|
||||||
// This function will only be called when NSApp is actually running.
|
// This function will only be called when NSApp is actually running.
|
||||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
|
||||||
{
|
{
|
||||||
if ([reflectionDelegate respondsToSelector:_cmd])
|
if ([reflectionDelegate respondsToSelector:_cmd])
|
||||||
return [reflectionDelegate applicationShouldTerminate:sender];
|
return [reflectionDelegate applicationShouldTerminate:sender];
|
||||||
|
|
||||||
if ([self canQuit]) {
|
|
||||||
if (!startedQuit) {
|
|
||||||
startedQuit = true;
|
|
||||||
// Close open windows. This is done in order to deliver de-expose
|
|
||||||
// events while the event loop is still running.
|
|
||||||
const QWindowList topLevels = QGuiApplication::topLevelWindows();
|
|
||||||
for (int i = 0; i < topLevels.size(); ++i) {
|
|
||||||
QWindow *topLevelWindow = topLevels.at(i);
|
|
||||||
// Already closed windows will not have a platform window, skip those
|
|
||||||
if (topLevelWindow->handle())
|
|
||||||
QWindowSystemInterface::handleCloseEvent(topLevelWindow);
|
|
||||||
}
|
|
||||||
QWindowSystemInterface::flushWindowSystemEvents();
|
|
||||||
|
|
||||||
QGuiApplication::exit(0);
|
|
||||||
startedQuit = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (QGuiApplicationPrivate::instance()->threadData->eventLoops.isEmpty()) {
|
if (QGuiApplicationPrivate::instance()->threadData->eventLoops.isEmpty()) {
|
||||||
// INVARIANT: No event loop is executing. This probably
|
// No event loop is executing. This probably means that Qt is used as a plugin,
|
||||||
// means that Qt is used as a plugin, or as a part of a native
|
// or as a part of a native Cocoa application. In any case it should be fine to
|
||||||
// Cocoa application. In any case it should be fine to
|
// terminate now.
|
||||||
// terminate now:
|
qCDebug(lcQpaApplication) << "No running event loops, terminating now";
|
||||||
return NSTerminateNow;
|
return NSTerminateNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!QWindowSystemInterface::handleApplicationTermination<QWindowSystemInterface::SynchronousDelivery>()) {
|
||||||
|
qCDebug(lcQpaApplication) << "Application termination canceled";
|
||||||
|
return NSTerminateCancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Even if the application termination was accepted by the application we can't
|
||||||
|
// return NSTerminateNow, as that would trigger AppKit to ultimately call exit().
|
||||||
|
// We need to ensure that the runloop continues spinning so that we can return
|
||||||
|
// from our own event loop back to main(), and exit from there.
|
||||||
|
qCDebug(lcQpaApplication) << "Termination accepted, but returning to runloop for exit through main()";
|
||||||
return NSTerminateCancel;
|
return NSTerminateCancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@
|
|||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QFileOpenEvent>
|
#include <QFileOpenEvent>
|
||||||
|
|
||||||
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
|
|
||||||
@ -52,8 +54,7 @@ QHaikuApplication::QHaikuApplication(const char *signature)
|
|||||||
|
|
||||||
bool QHaikuApplication::QuitRequested()
|
bool QHaikuApplication::QuitRequested()
|
||||||
{
|
{
|
||||||
QEvent quitEvent(QEvent::Quit);
|
QWindowSystemInterface::handleApplicationTermination<QWindowSystemInterface::SynchronousDelivery>();
|
||||||
QCoreApplication::sendEvent(QCoreApplication::instance(), &quitEvent);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,8 @@
|
|||||||
|
|
||||||
#ifndef QT_NO_SESSIONMANAGER
|
#ifndef QT_NO_SESSIONMANAGER
|
||||||
|
|
||||||
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
#include <qguiapplication.h>
|
#include <qguiapplication.h>
|
||||||
#include <qdatetime.h>
|
#include <qdatetime.h>
|
||||||
#include <qfileinfo.h>
|
#include <qfileinfo.h>
|
||||||
@ -289,8 +291,7 @@ static void sm_dieCallback(SmcConn smcConn, SmPointer /* clientData */)
|
|||||||
if (smcConn != smcConnection)
|
if (smcConn != smcConnection)
|
||||||
return;
|
return;
|
||||||
resetSmState();
|
resetSmState();
|
||||||
QEvent quitEvent(QEvent::Quit);
|
QWindowSystemInterface::handleApplicationTermination<QWindowSystemInterface::SynchronousDelivery>();
|
||||||
QGuiApplication::sendEvent(qApp, &quitEvent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sm_shutdownCancelledCallback(SmcConn smcConn, SmPointer clientData)
|
static void sm_shutdownCancelledCallback(SmcConn smcConn, SmPointer clientData)
|
||||||
|
@ -1680,7 +1680,7 @@ static void writeResourceIcon(QTextStream &output,
|
|||||||
"Selected", "Off");
|
"Selected", "Off");
|
||||||
}
|
}
|
||||||
if (i->hasElementSelectedOn()) {
|
if (i->hasElementSelectedOn()) {
|
||||||
writeIconAddFile(output, indent, iconName, i->elementSelectedOff()->text(),
|
writeIconAddFile(output, indent, iconName, i->elementSelectedOn()->text(),
|
||||||
"Selected", "On");
|
"Selected", "On");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -549,6 +549,10 @@
|
|||||||
If the property references an enum declared with Q_ENUMS, you should
|
If the property references an enum declared with Q_ENUMS, you should
|
||||||
reference its constants by name, i.e., not their numeric value.
|
reference its constants by name, i.e., not their numeric value.
|
||||||
|
|
||||||
|
\note Use the qproperty syntax with care, as it modifies the
|
||||||
|
widget that is being painted. Also, the qproperty syntax is evaluated only
|
||||||
|
once, which is when the widget is polished by the style. This means that any
|
||||||
|
attempt to use them in pseudo-states such as QPushButton:hover, will not work.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1866,22 +1866,19 @@ void QApplication::aboutQt()
|
|||||||
bool QApplication::event(QEvent *e)
|
bool QApplication::event(QEvent *e)
|
||||||
{
|
{
|
||||||
Q_D(QApplication);
|
Q_D(QApplication);
|
||||||
if(e->type() == QEvent::Close) {
|
if (e->type() == QEvent::Quit) {
|
||||||
QCloseEvent *ce = static_cast<QCloseEvent*>(e);
|
|
||||||
ce->accept();
|
|
||||||
closeAllWindows();
|
closeAllWindows();
|
||||||
|
for (auto *w : topLevelWidgets()) {
|
||||||
const QWidgetList list = topLevelWidgets();
|
|
||||||
for (auto *w : list) {
|
|
||||||
if (w->isVisible() && !(w->windowType() == Qt::Desktop) && !(w->windowType() == Qt::Popup) &&
|
if (w->isVisible() && !(w->windowType() == Qt::Desktop) && !(w->windowType() == Qt::Popup) &&
|
||||||
(!(w->windowType() == Qt::Dialog) || !w->parentWidget())) {
|
(!(w->windowType() == Qt::Dialog) || !w->parentWidget())) {
|
||||||
ce->ignore();
|
e->ignore();
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ce->isAccepted()) {
|
// Explicitly call QCoreApplication instead of QGuiApplication so that
|
||||||
return true;
|
// we don't let QGuiApplication close any windows we skipped earlier in
|
||||||
}
|
// closeAllWindows(). FIXME: Unify all this close magic through closeAllWindows.
|
||||||
|
return QCoreApplication::event(e);
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
} else if (e->type() == QEvent::LocaleChange) {
|
} else if (e->type() == QEvent::LocaleChange) {
|
||||||
// on Windows the event propagation is taken care by the
|
// on Windows the event propagation is taken care by the
|
||||||
|
@ -2068,7 +2068,12 @@ void tst_QTextLayout::cursorInLigatureWithMultipleLines()
|
|||||||
|
|
||||||
void tst_QTextLayout::xToCursorForLigatures()
|
void tst_QTextLayout::xToCursorForLigatures()
|
||||||
{
|
{
|
||||||
|
#if defined(Q_OS_WIN32)
|
||||||
|
QTextLayout layout("fi", QFont("Calibri", 20));
|
||||||
|
#else
|
||||||
QTextLayout layout("fi", QFont("Times", 20));
|
QTextLayout layout("fi", QFont("Times", 20));
|
||||||
|
#endif
|
||||||
|
|
||||||
layout.setCacheEnabled(true);
|
layout.setCacheEnabled(true);
|
||||||
layout.beginLayout();
|
layout.beginLayout();
|
||||||
QTextLine line = layout.createLine();
|
QTextLine line = layout.createLine();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user