mirror of https://github.com/CGAL/cgal
Remove deprecated Qt version checks and unused code
This commit is contained in:
parent
569b9ebe4a
commit
bf10f945a9
|
|
@ -109,15 +109,6 @@ void CurveInputMethod::beginInput_()
|
|||
for (auto& item : items) this->getScene()->addItem(item);
|
||||
}
|
||||
|
||||
static inline void clearPainterPath(QPainterPath& ppath)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
|
||||
ppath.clear();
|
||||
#else
|
||||
ppath = {};
|
||||
#endif
|
||||
}
|
||||
|
||||
void CurveInputMethod::reset()
|
||||
{
|
||||
this->resetInput();
|
||||
|
|
@ -193,7 +184,6 @@ PolylineInputMethod::PolylineInputMethod() :
|
|||
|
||||
void PolylineInputMethod::beginInput()
|
||||
{
|
||||
clearPainterPath(this->painterPath);
|
||||
this->polylineGuide.setPath(this->painterPath);
|
||||
this->lastLine.setLine(0, 0, 0, 0);
|
||||
QPen pen = this->polylineGuide.pen();
|
||||
|
|
@ -356,8 +346,6 @@ BezierInputMethod::BezierInputMethod() : CurveInputMethod(CurveType::Bezier, -1)
|
|||
|
||||
void BezierInputMethod::beginInput()
|
||||
{
|
||||
clearPainterPath(this->painterOldPath);
|
||||
clearPainterPath(this->painterPath);
|
||||
this->bezierGuide.setPath(this->painterPath);
|
||||
this->bezierOldGuide.setPath(this->painterOldPath);
|
||||
|
||||
|
|
@ -407,7 +395,6 @@ static void updateBezierPainterPath(
|
|||
const std::vector<QPointF>& controlPoints, std::vector<QPointF>& cache,
|
||||
const QTransform& worldTransform, QPainterPath& painterPath)
|
||||
{
|
||||
clearPainterPath(painterPath);
|
||||
if (controlPoints.size() < 2) return;
|
||||
|
||||
float pixel_len = approx_pixel_length(controlPoints, worldTransform);
|
||||
|
|
|
|||
|
|
@ -478,15 +478,6 @@ public:
|
|||
qreal bufferTextureMaxU() const { return bufferTextureMaxU_; }
|
||||
/*! Same as bufferTextureMaxU(), but for the v texture coordinate. */
|
||||
qreal bufferTextureMaxV() const { return bufferTextureMaxV_; }
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
|
||||
// These methods are part of the QGLWidget public API.
|
||||
// As of version 2.7.0, the use of QOpenGLWidget instead means that they have
|
||||
// to be provided for backward compatibility.
|
||||
void renderText(int x, int y, const QString &str,
|
||||
const QFont &font = QFont());
|
||||
void renderText(double x, double y, double z, const QString &str,
|
||||
const QFont &font = QFont());
|
||||
#endif
|
||||
|
||||
public Q_SLOTS:
|
||||
void copyBufferToTexture(GLint, GLenum = GL_NONE);
|
||||
|
|
|
|||
|
|
@ -720,30 +720,6 @@ CGAL_INLINE_FUNCTION
|
|||
void CGAL::QGLViewer::drawLight(GLenum, qreal ) const {
|
||||
}
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
|
||||
CGAL_INLINE_FUNCTION
|
||||
void CGAL::QGLViewer::renderText(int x, int y, const QString &str,
|
||||
const QFont &font) {
|
||||
QColor fontColor = QColor(0, 0,
|
||||
0, 255);
|
||||
|
||||
// Render text
|
||||
QPainter painter(this);
|
||||
painter.setPen(fontColor);
|
||||
painter.setFont(font);
|
||||
painter.drawText(x, y, str);
|
||||
painter.end();
|
||||
}
|
||||
|
||||
CGAL_INLINE_FUNCTION
|
||||
void CGAL::QGLViewer::renderText(double x, double y, double z, const QString &str,
|
||||
const QFont &font) {
|
||||
using CGAL::qglviewer::Vec;
|
||||
const Vec proj = camera_->projectedCoordinatesOf(Vec(x, y, z));
|
||||
renderText(int(proj.x), int(proj.y), str, font);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*! Draws \p text at position \p x, \p y (expressed in screen coordinates
|
||||
pixels, origin in the upper left corner of the widget).
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,6 @@ int& code_to_call_before_creation_of_QCoreApplication(int& i) {
|
|||
fmt.setOption(QSurfaceFormat::DebugContext);
|
||||
QSurfaceFormat::setDefaultFormat(fmt);
|
||||
|
||||
//for windows
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
|
||||
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
||||
#endif
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -663,15 +663,6 @@ void MainWindow::loadPlugins()
|
|||
}
|
||||
}
|
||||
QString env_path = qgetenv("LAB_DEMO_PLUGINS_PATH");
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
|
||||
QChar separator = QDir::listSeparator();
|
||||
#else
|
||||
#if defined(_WIN32)
|
||||
QChar separator = ';';
|
||||
#else
|
||||
QChar separator = ':';
|
||||
#endif
|
||||
#endif
|
||||
if(!env_path.isEmpty()) {
|
||||
#if defined(_WIN32)
|
||||
QString path = qgetenv("PATH");
|
||||
|
|
|
|||
Loading…
Reference in New Issue