Merge pull request #930 from manongjohn/fix_incorrect_qt_version_check
Fix incorrect QT_VERSION checks
This commit is contained in:
commit
ccee82315f
6 changed files with 7 additions and 7 deletions
|
@ -179,7 +179,7 @@ TPoint TFont::drawChar(QImage &outImage, TPoint &unused, wchar_t charcode,
|
|||
// (21/1/2022) Use this workaround for all platforms as the crash also occured
|
||||
// in windows when the display is scaled up.
|
||||
if (chars[0].isSpace()) {
|
||||
#if QT_VERSION >= 0x051100
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
|
||||
int w = QFontMetrics(m_pimpl->m_font).horizontalAdvance(chars[0]);
|
||||
#else
|
||||
int w = raw.averageCharWidth();
|
||||
|
|
|
@ -249,7 +249,7 @@ AudioRecordingPopup::~AudioRecordingPopup() {}
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
void AudioRecordingPopup::onRecordButtonPressed() {
|
||||
#if QT_VERSION >= 0x051000
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (m_audioInput->state() == QAudio::InterruptedState) {
|
||||
DVGui::warning(
|
||||
tr("The microphone is not available: "
|
||||
|
|
|
@ -995,7 +995,7 @@ void XSheetPDFTemplate::drawCellNumber(QPainter& painter, QRect rect,
|
|||
circlePen.setWidth(mm2px(0.3));
|
||||
painter.setPen(circlePen);
|
||||
QFontMetrics fm(font);
|
||||
#if QT_VERSION >= 0x051100
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
|
||||
int keyR_width =
|
||||
std::max(param(RowHeight), fm.horizontalAdvance(str) + mm2px(1));
|
||||
#else
|
||||
|
|
|
@ -246,7 +246,7 @@ ImageViewer::ImageViewer(QWidget *parent, FlipBook *flipbook,
|
|||
if (Preferences::instance()->isColorCalibrationEnabled())
|
||||
m_lutCalibrator = new LutCalibrator();
|
||||
|
||||
#if QT_VERSION >= 0x051000
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (Preferences::instance()->is30bitDisplayEnabled())
|
||||
setTextureFormat(TGL_TexFmt10);
|
||||
#endif
|
||||
|
|
|
@ -280,7 +280,7 @@ PreferencesPopup::Display30bitChecker::GLView::GLView(QWidget* parent,
|
|||
bool is30bit)
|
||||
: QOpenGLWidget(parent), m_is30bit(is30bit) {
|
||||
setFixedSize(500, 100);
|
||||
#if QT_VERSION >= 0x051000
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (m_is30bit) setTextureFormat(TGL_TexFmt10);
|
||||
#endif
|
||||
}
|
||||
|
@ -1618,7 +1618,7 @@ QWidget* PreferencesPopup::createInterfacePage() {
|
|||
// insertUI(interfaceFontStyle, lay, buildFontStyleList());
|
||||
QGridLayout* colorCalibLay = insertGroupBoxUI(colorCalibrationEnabled, lay);
|
||||
{ insertUI(colorCalibrationLutPaths, colorCalibLay); }
|
||||
#if QT_VERSION >= 0x051000
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
insertUI(displayIn30bit, lay);
|
||||
row = lay->rowCount();
|
||||
lay->addWidget(check30bitBtn, row - 1, 2, Qt::AlignRight);
|
||||
|
|
|
@ -836,7 +836,7 @@ SceneViewer::SceneViewer(ImageUtils::FullScreenWidget *parent)
|
|||
|
||||
if (Preferences::instance()->isColorCalibrationEnabled())
|
||||
m_lutCalibrator = new LutCalibrator();
|
||||
#if QT_VERSION >= 0x051000
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
if (Preferences::instance()->is30bitDisplayEnabled())
|
||||
setTextureFormat(TGL_TexFmt10);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue