Exclude QtQuick for now

This commit is contained in:
Matthias Kuhn 2020-08-09 14:54:55 +02:00
parent cea65ba9b2
commit 3177e76229
2 changed files with 9 additions and 12 deletions

View File

@ -7,7 +7,7 @@ ccache -S
cmake -GNinja \
-DUSE_CCACHE=ON \
-DWITH_QUICK=ON \
-DWITH_QUICK=OFF \
-DWITH_3D=ON \
-DWITH_STAGED_PLUGINS=ON \
-DWITH_GRASS=OFF \

View File

@ -14,8 +14,7 @@
***************************************************************************/
#include <QApplication>
#include <QWindow>
#include <QScreen>
#include <QDesktopWidget>
#include <QString>
#include "qgis.h"
@ -335,12 +334,11 @@ void QgsQuickUtils::formatToUSCSDistance( double srcDistance,
QString QgsQuickUtils::dumpScreenInfo() const
{
// take the first top level window
QScreen *screen = QGuiApplication::topLevelWindows().at( 0 )->screen();
double dpiX = screen->physicalDotsPerInchX();
double dpiY = screen->physicalDotsPerInchY();
int height = screen->geometry().height();
int width = screen->geometry().width();
QRect rec = QApplication::desktop()->screenGeometry();
int dpiX = QApplication::desktop()->physicalDpiX();
int dpiY = QApplication::desktop()->physicalDpiY();
int height = rec.height();
int width = rec.width();
double sizeX = static_cast<double>( width ) / dpiX * 25.4;
double sizeY = static_cast<double>( height ) / dpiY * 25.4;
@ -393,9 +391,8 @@ qreal QgsQuickUtils::screenDensity() const
qreal QgsQuickUtils::calculateScreenDensity()
{
// calculate screen density for calculation of real pixel sizes from density-independent pixels
QScreen *screen = QGuiApplication::topLevelWindows().at( 0 )->screen();
double dpiX = screen->physicalDotsPerInchX();
double dpiY = screen->physicalDotsPerInchY();
int dpiX = QApplication::desktop()->physicalDpiX();
int dpiY = QApplication::desktop()->physicalDpiY();
int dpi = dpiX < dpiY ? dpiX : dpiY; // In case of asymmetrical DPI. Improbable
return dpi / 160.; // 160 DPI is baseline for density-independent pixels in Android
}