Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octovis: Fix deprecated QString and glext redefinition warning #375

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions octovis/src/OcTreeDrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

#include <octovis/OcTreeDrawer.h>
#undef GL_GLEXT_VERSION // Previously defined by glu
#include <qglviewer.h>

#define OTD_RAD2DEG 57.2957795
Expand Down
4 changes: 2 additions & 2 deletions octovis/src/ViewerGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,13 +1259,13 @@ void ViewerGui::saveCameraPosition(const char* filename) const {
ViewerWidget* aux = const_cast<ViewerWidget*>( m_glwidget);
aux->setStateFileName(QString(filename));
aux->saveStateToFile();
aux->setStateFileName(QString::null);
aux->setStateFileName(QString());
}

void ViewerGui::loadCameraPosition(const char* filename) {
m_glwidget->setStateFileName(QString(filename));
m_glwidget->restoreStateFromFile();
m_glwidget->setStateFileName(QString::null);
m_glwidget->setStateFileName(QString());
}


Expand Down
14 changes: 7 additions & 7 deletions octovis/src/extern/QGLViewer/qglviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ QString QGLViewer::mouseActionString(QGLViewer::MouseAction ma)
{
switch (ma)
{
case QGLViewer::NO_MOUSE_ACTION : return QString::null;
case QGLViewer::NO_MOUSE_ACTION : return QString();
case QGLViewer::ROTATE : return QGLViewer::tr("Rotates", "ROTATE mouse action");
case QGLViewer::ZOOM : return QGLViewer::tr("Zooms", "ZOOM mouse action");
case QGLViewer::TRANSLATE : return QGLViewer::tr("Translates", "TRANSLATE mouse action");
Expand All @@ -1566,14 +1566,14 @@ QString QGLViewer::mouseActionString(QGLViewer::MouseAction ma)
case QGLViewer::SCREEN_TRANSLATE : return QGLViewer::tr("Horizontally/Vertically translates", "SCREEN_TRANSLATE mouse action");
case QGLViewer::ZOOM_ON_REGION : return QGLViewer::tr("Zooms on region for", "ZOOM_ON_REGION mouse action");
}
return QString::null;
return QString();
}

QString QGLViewer::clickActionString(QGLViewer::ClickAction ca)
{
switch (ca)
{
case QGLViewer::NO_CLICK_ACTION : return QString::null;
case QGLViewer::NO_CLICK_ACTION : return QString();
case QGLViewer::ZOOM_ON_PIXEL : return QGLViewer::tr("Zooms on pixel", "ZOOM_ON_PIXEL click action");
case QGLViewer::ZOOM_TO_FIT : return QGLViewer::tr("Zooms to fit scene", "ZOOM_TO_FIT click action");
case QGLViewer::SELECT : return QGLViewer::tr("Selects", "SELECT click action");
Expand All @@ -1585,7 +1585,7 @@ QString QGLViewer::clickActionString(QGLViewer::ClickAction ca)
case QGLViewer::ALIGN_FRAME : return QGLViewer::tr("Aligns manipulated frame", "ALIGN_FRAME click action");
case QGLViewer::ALIGN_CAMERA : return QGLViewer::tr("Aligns camera", "ALIGN_CAMERA click action");
}
return QString::null;
return QString();
}

static QString keyString(unsigned int key)
Expand Down Expand Up @@ -1831,7 +1831,7 @@ void QGLViewer::setKeyDescription(unsigned int key, QString description)
QString QGLViewer::cameraPathKeysString() const
{
if (pathIndex_.isEmpty())
return QString::null;
return QString();

QVector<Qt::Key> keys;
keys.reserve(pathIndex_.count());
Expand Down Expand Up @@ -3366,7 +3366,7 @@ This is the name of the XML file where saveStateToFile() saves the viewer state
widget geometry, display flags... see domElement()) on exit. Use restoreStateFromFile() to restore
this state later (usually in your init() method).

Setting this value to \c QString::null will disable the automatic state file saving that normally
Setting this value to \c QString() will disable the automatic state file saving that normally
occurs on exit.

If more than one viewer are created by the application, this function will return a numbered file
Expand Down Expand Up @@ -3395,7 +3395,7 @@ domElement().
Use restoreStateFromFile() to restore this viewer state.

This method is automatically called when a viewer is closed (using Escape or using the window's
upper right \c x close button). setStateFileName() to \c QString::null to prevent this. */
upper right \c x close button). setStateFileName() to \c QString() to prevent this. */
void QGLViewer::saveStateToFile()
{
QString name = stateFileName();
Expand Down
4 changes: 2 additions & 2 deletions octovis/src/extern/QGLViewer/qglviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1059,8 +1059,8 @@ public Q_SLOTS:
void setStateFileName(const QString& name) { stateFileName_ = name; }

#ifndef DOXYGEN
void saveToFile(const QString& fileName=QString::null);
bool restoreFromFile(const QString& fileName=QString::null);
void saveToFile(const QString& fileName=QString());
bool restoreFromFile(const QString& fileName=QString());
#endif

private:
Expand Down