Windows QPA: Format window title correctly when creating a window.
Add convenience QWindowsWindow::formatWindowTitle() and use that in QWindowsIntegration::createPlatformWindow(). Task-number: QTBUG-53394 Change-Id: I76ebade97c5af71ffa3d11075511b94a54a3dbf8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>bb10
parent
8e8bd90e44
commit
b8a0c6e7c5
|
|
@ -331,7 +331,9 @@ QPlatformWindow *QWindowsIntegration::createPlatformWindow(QWindow *window) cons
|
|||
if (customMarginsV.isValid())
|
||||
requested.customMargins = qvariant_cast<QMargins>(customMarginsV);
|
||||
|
||||
QWindowsWindowData obtained = QWindowsWindowData::create(window, requested, window->title());
|
||||
QWindowsWindowData obtained =
|
||||
QWindowsWindowData::create(window, requested,
|
||||
QWindowsWindow::formatWindowTitle(window->title()));
|
||||
qCDebug(lcQpaWindows).nospace()
|
||||
<< __FUNCTION__ << ' ' << window
|
||||
<< "\n Requested: " << requested.geometry << " frame incl.="
|
||||
|
|
|
|||
|
|
@ -1696,7 +1696,7 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
|
|||
|
||||
void QWindowsWindow::setWindowTitle(const QString &title)
|
||||
{
|
||||
setWindowTitle_sys(QWindowsWindow::formatWindowTitle(title, QStringLiteral(" - ")));
|
||||
setWindowTitle_sys(QWindowsWindow::formatWindowTitle(title));
|
||||
}
|
||||
|
||||
void QWindowsWindow::setWindowFlags(Qt::WindowFlags flags)
|
||||
|
|
@ -2534,4 +2534,9 @@ void QWindowsWindow::setHasBorderInFullScreen(bool border)
|
|||
clearFlag(HasBorderInFullScreen);
|
||||
}
|
||||
|
||||
QString QWindowsWindow::formatWindowTitle(const QString &title)
|
||||
{
|
||||
return QPlatformWindow::formatWindowTitle(title, QStringLiteral(" - "));
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -327,6 +327,8 @@ public:
|
|||
void registerTouchWindow(QWindowsWindowFunctions::TouchWindowTouchTypes touchTypes = QWindowsWindowFunctions::NormalTouch);
|
||||
static void setHasBorderInFullScreenStatic(QWindow *window, bool border);
|
||||
void setHasBorderInFullScreen(bool border);
|
||||
static QString formatWindowTitle(const QString &title);
|
||||
|
||||
private:
|
||||
inline void show_sys() const;
|
||||
inline QWindowsWindowData setWindowFlags_sys(Qt::WindowFlags wt, unsigned flags = 0) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue