mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove ifdefs for Qt4 support.
This commit is contained in:
parent
2bc677b8c8
commit
8211727b79
@ -1355,12 +1355,8 @@ int RiaApplication::launchUnitTests()
|
||||
caf::ProgressInfoBlocker progressBlocker;
|
||||
cvf::Assert::setReportMode( cvf::Assert::CONSOLE );
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
int argc = QCoreApplication::argc();
|
||||
char** argv = QCoreApplication::argv();
|
||||
#else
|
||||
int argc = QCoreApplication::arguments().size();
|
||||
QStringList arguments = QCoreApplication::arguments();
|
||||
int argc = QCoreApplication::arguments().size();
|
||||
QStringList arguments = QCoreApplication::arguments();
|
||||
std::vector<std::string> argumentsStd;
|
||||
for ( QString qstring : arguments )
|
||||
{
|
||||
@ -1372,7 +1368,6 @@ int RiaApplication::launchUnitTests()
|
||||
argVector.push_back( &string.front() );
|
||||
}
|
||||
char** argv = argVector.data();
|
||||
#endif
|
||||
|
||||
testing::InitGoogleTest( &argc, argv );
|
||||
|
||||
|
@ -35,10 +35,7 @@
|
||||
#include <QDate>
|
||||
#include <QDir>
|
||||
#include <QLocale>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include <QStandardPaths>
|
||||
#endif
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@ -118,14 +115,11 @@ RiaPreferences::RiaPreferences( void )
|
||||
#ifdef WIN32
|
||||
defaultTextEditor = QString( "notepad.exe" );
|
||||
#else
|
||||
defaultTextEditor = QString( "kate" );
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
defaultTextEditor = QStandardPaths::findExecutable( "kate" );
|
||||
if ( defaultTextEditor.isEmpty() )
|
||||
{
|
||||
defaultTextEditor = QStandardPaths::findExecutable( "gedit" );
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CAF_PDM_InitField( &scriptEditorExecutable, "scriptEditorExecutable", defaultTextEditor, "Script Editor", "", "", "" );
|
||||
|
@ -528,16 +528,6 @@ QString RicHoloLensRestClient::networkErrorCodeAsString( QNetworkReply::NetworkE
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
qint64 RicHoloLensRestClient::getCurrentTimeStamp_ms()
|
||||
{
|
||||
#if QT_VERSION >= 0x040700
|
||||
const qint64 timeStamp_ms = QDateTime::currentMSecsSinceEpoch();
|
||||
return timeStamp_ms;
|
||||
#elif defined( __linux__ )
|
||||
struct timespec ts;
|
||||
if ( clock_gettime( CLOCK_MONOTONIC, &ts ) == 0 )
|
||||
{
|
||||
return static_cast<qint64>( ts.tv_sec * 1000 + ts.tv_nsec / 1000000 );
|
||||
}
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
@ -41,12 +41,8 @@
|
||||
#include <QSslConfiguration>
|
||||
#include <QSslSocket>
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets>
|
||||
#else
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include <QtNetwork>
|
||||
#include <QtWidgets>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -349,11 +345,7 @@ void RiuWellImportWizard::startRequest( QUrl url )
|
||||
if ( supportsSsl )
|
||||
{
|
||||
QSslConfiguration config = QSslConfiguration::defaultConfiguration();
|
||||
#if QT_VERSION >= 0x050000
|
||||
config.setProtocol( QSsl::TlsV1_0 );
|
||||
#else
|
||||
config.setProtocol( QSsl::TlsV1 );
|
||||
#endif
|
||||
request.setSslConfiguration( config );
|
||||
}
|
||||
#endif
|
||||
|
@ -124,11 +124,7 @@ QWidget* RicSummaryCurveCalculatorWidgetCreator::createWidget( QWidget* parent )
|
||||
m_pdmTableView->enableHeaderText( false );
|
||||
|
||||
QHeaderView* verticalHeader = m_pdmTableView->tableView()->verticalHeader();
|
||||
#if QT_VERSION >= 0x050000
|
||||
verticalHeader->setSectionResizeMode( QHeaderView::Interactive );
|
||||
#else
|
||||
verticalHeader->setResizeMode( QHeaderView::Interactive );
|
||||
#endif
|
||||
|
||||
m_pdmTableView->tableView()->resizeColumnsToContents();
|
||||
|
||||
|
@ -35,12 +35,8 @@
|
||||
|
||||
#include "cafFactory.h"
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QtWidgets/qmdisubwindow.h>
|
||||
#else
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include <QtNetwork>
|
||||
#include <QtWidgets/QMdiSubWindow>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
|
@ -76,11 +76,7 @@ RiuAdvancedSnapshotExportWidget::RiuAdvancedSnapshotExportWidget( QWidget* paren
|
||||
m_pdmTableView->setChildArrayField( &( project->multiSnapshotDefinitions() ) );
|
||||
|
||||
QHeaderView* verticalHeader = m_pdmTableView->tableView()->verticalHeader();
|
||||
#if QT_VERSION >= 0x050000
|
||||
verticalHeader->setSectionResizeMode( QHeaderView::Interactive );
|
||||
#else
|
||||
verticalHeader->setResizeMode( QHeaderView::Interactive );
|
||||
#endif
|
||||
m_pdmTableView->tableView()->resizeColumnsToContents();
|
||||
|
||||
// Set active child array to be able to use generic delete
|
||||
|
@ -59,12 +59,7 @@ RiuEditPerforationCollectionWidget::RiuEditPerforationCollectionWidget( QWidget*
|
||||
m_pdmTableView->setChildArrayField( &( m_perforationCollection->m_perforations ) );
|
||||
|
||||
QHeaderView* verticalHeader = m_pdmTableView->tableView()->verticalHeader();
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
verticalHeader->setSectionResizeMode( QHeaderView::Interactive );
|
||||
#else
|
||||
verticalHeader->setResizeMode( QHeaderView::Interactive );
|
||||
#endif
|
||||
m_pdmTableView->tableView()->resizeColumnsToContents();
|
||||
|
||||
// Set active child array to be able to use generic delete
|
||||
|
Loading…
Reference in New Issue
Block a user