mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 842805 - Use of API deprecated in Qt5. r=romaxa, r=glandium
This commit is contained in:
parent
fbbdc55e37
commit
35e5cbc38b
17
configure.in
17
configure.in
@ -4673,7 +4673,7 @@ then
|
||||
|
||||
if test -z "$QTDIR"; then
|
||||
PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtCore QtOpenGL)
|
||||
PKG_CHECK_MODULES(MOZ_QT5, QtWidgets QtMultimedia QtPrintSupport,
|
||||
PKG_CHECK_MODULES(MOZ_QT5, Qt5Widgets Qt5Multimedia Qt5PrintSupport,
|
||||
MOZ_ENABLE_QT5=1,
|
||||
MOZ_ENABLE_QT5=)
|
||||
if test "$MOZ_ENABLE_QT5"; then
|
||||
@ -4685,25 +4685,28 @@ then
|
||||
AC_CHECK_PROGS(HOST_MOC, $MOC moc, "")
|
||||
AC_CHECK_PROGS(HOST_RCC, $RCC rcc, "")
|
||||
else
|
||||
MOZ_QT_LIBS="-L$QTDIR/lib/ -lQtGui -lQtNetwork -lQtCore -lQtXml -lQtOpenGL"
|
||||
|
||||
MOZ_QT_CFLAGS="-DQT_SHARED"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/Qt"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtGui"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtCore"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtNetwork"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtXml"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtDeclarative"
|
||||
HOST_MOC="$QTDIR/bin/moc"
|
||||
HOST_RCC="$QTDIR/bin/rcc"
|
||||
|
||||
# QtWidgets was introduced only in Qt5
|
||||
if test -d $QTDIR/include/QtWidgets; then
|
||||
echo "Using qt5"
|
||||
MOZ_QT_LIBS="-L$QTDIR/lib/ -lQt5Gui -lQt5Network -lQt5Core -lQt5Xml -lQt5OpenGL"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtGui/5.0.1/QtGui"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtWidgets"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/QtPrintSupport"
|
||||
MOZ_QT_LIBS="$MOZ_QT_LIBS -lQtWidgets -lQtPrintSupport"
|
||||
MOZ_QT_LIBS="$MOZ_QT_LIBS -lQt5Widgets -lQt5PrintSupport"
|
||||
else
|
||||
MOZ_QT_LIBS="-L$QTDIR/lib/ -lQtGui -lQtNetwork -lQtCore -lQtXml -lQtOpenGL"
|
||||
MOZ_QT_CFLAGS="$MOZ_QT_CFLAGS -I$QTDIR/include/Qt"
|
||||
fi
|
||||
HOST_MOC="$QTDIR/bin/moc"
|
||||
HOST_RCC="$QTDIR/bin/rcc"
|
||||
fi
|
||||
if test -z "$HOST_MOC"; then
|
||||
AC_MSG_ERROR([No acceptable moc preprocessor found. Qt SDK is not installed or --with-qt is
|
||||
|
@ -728,7 +728,7 @@ _cairo_qt_surface_set_clip_region (cairo_qt_surface_t *qs,
|
||||
cairo_region_get_rectangle (clip_region, i, &rect);
|
||||
|
||||
QRect r(rect.x, rect.y, rect.width, rect.height);
|
||||
qr = qr.unite(r);
|
||||
qr = qr.united(r);
|
||||
}
|
||||
|
||||
qs->p->setClipRegion (qr, Qt::IntersectClip);
|
||||
|
@ -8,7 +8,8 @@
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||
# include <QX11Info>
|
||||
#else
|
||||
# include <QPlatformNativeInterface>
|
||||
# include <qpa/qplatformnativeinterface.h>
|
||||
# include <qpa/qplatformintegration.h>
|
||||
#endif
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
|
@ -128,7 +128,7 @@ nsLocaleService::nsLocaleService(void)
|
||||
NS_ENSURE_TRUE_VOID(resultLocale);
|
||||
|
||||
#ifdef MOZ_WIDGET_QT
|
||||
const char* lang = QLocale::system().name().toAscii();
|
||||
const char* lang = QLocale::system().name().toUtf8();
|
||||
#else
|
||||
// Get system configuration
|
||||
const char* lang = getenv("LANG");
|
||||
|
@ -23,10 +23,12 @@ void nsQAppInstance::AddRef(int& aArgc, char** aArgv, bool aDefaultProcess) {
|
||||
if (qApp)
|
||||
return;
|
||||
if (!sQAppInstance) {
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||
const char *graphicsSystem = getenv("MOZ_QT_GRAPHICSSYSTEM");
|
||||
if (graphicsSystem) {
|
||||
QApplication::setGraphicsSystem(QString(graphicsSystem));
|
||||
}
|
||||
#endif
|
||||
#if (MOZ_PLATFORM_MAEMO == 6)
|
||||
// Should create simple windows style for non chrome process
|
||||
// otherwise meegotouch style initialize and crash happen
|
||||
|
@ -24,7 +24,12 @@ NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(bool *aIsRTL)
|
||||
{
|
||||
*aIsRTL = false;
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
|
||||
Qt::LayoutDirection layoutDir = QApplication::keyboardInputDirection();
|
||||
#else
|
||||
QInputMethod* input = qApp->inputMethod();
|
||||
Qt::LayoutDirection layoutDir = input ? input->inputDirection() : Qt::LeftToRight;
|
||||
#endif
|
||||
|
||||
if (layoutDir == Qt::RightToLeft) {
|
||||
*aIsRTL = true;
|
||||
|
@ -87,7 +87,7 @@ NS_IMETHODIMP nsDeviceContextSpecQt::GetSurfaceForPrinter(
|
||||
file.setAutoRemove(false);
|
||||
|
||||
nsresult rv = NS_NewNativeLocalFile(
|
||||
nsDependentCString(file.fileName().toAscii().constData()),
|
||||
nsDependentCString(file.fileName().toUtf8().constData()),
|
||||
false,
|
||||
getter_AddRefs(mSpoolFile));
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -512,7 +512,7 @@ NS_IMETHODIMP
|
||||
nsNativeThemeQt::WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType,
|
||||
nsIAtom* aAttribute, bool* aShouldRepaint)
|
||||
{
|
||||
*aShouldRepaint = TRUE;
|
||||
*aShouldRepaint = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2170,7 +2170,7 @@ nsWindow::OnDragDropEvent(QGraphicsSceneDragDropEvent *aDropEvent)
|
||||
{
|
||||
if (aDropEvent->proposedAction() == Qt::CopyAction)
|
||||
{
|
||||
printf("text version of the data: %s\n", aDropEvent->mimeData()->text().toAscii().data());
|
||||
printf("text version of the data: %s\n", aDropEvent->mimeData()->text().toUtf8().data());
|
||||
aDropEvent->acceptProposedAction();
|
||||
}
|
||||
|
||||
@ -3249,7 +3249,11 @@ nsWindow::GetInputContext()
|
||||
mInputContext.mIMEState.mOpen = IMEState::OPEN_STATE_NOT_SUPPORTED;
|
||||
// Our qt widget looks like using only one context per process.
|
||||
// However, it's better to set the context's pointer.
|
||||
#if (QT_VERSION <= QT_VERSION_CHECK(5, 0, 0))
|
||||
mInputContext.mNativeIMEContext = qApp->inputContext();
|
||||
#else
|
||||
mInputContext.mNativeIMEContext = nullptr;
|
||||
#endif
|
||||
return mInputContext;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user