Remove ifdefs for Qt4 support.

This commit is contained in:
Kristian Bendiksen
2020-05-12 09:00:20 +02:00
committed by Magne Sjaastad
parent 2bc677b8c8
commit 8211727b79
8 changed files with 4 additions and 50 deletions

View File

@@ -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 );

View File

@@ -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", "", "", "" );