Skip to content
Permalink
Browse files

oracle provider: update qocispatial driver for/from Qt5

* handling of private data
* rely on implicit byte array sharing instead of using data pointers
* sync with qoci
  • Loading branch information
jef-n committed Mar 2, 2017
1 parent febff07 commit bd58bc337c99fd5dc1c0c897abf5888412fcd17c
@@ -9,12 +9,15 @@ ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)

INCLUDE_DIRECTORIES(SYSTEM ${OCI_INCLUDE_DIR})
INCLUDE_DIRECTORIES(SYSTEM
${OCI_INCLUDE_DIR}
${Qt5Sql_PRIVATE_INCLUDE_DIRS}
)

SET(QSQLOCISPATIAL_SRC qsql_ocispatial.cpp main.cpp)
QT5_WRAP_CPP(QSQLOCISPATIAL_SRC qsql_ocispatial.h main.h)
QT5_WRAP_CPP(QSQLOCISPATIAL_MOC_SRC qsql_ocispatial.h main.h)

ADD_LIBRARY(qsqlocispatial SHARED ${QSQLOCISPATIAL_SRC})
ADD_LIBRARY(qsqlocispatial SHARED ${QSQLOCISPATIAL_SRC} ${QSQLOCISPATIAL_MOC_SRC})

TARGET_LINK_LIBRARIES(qsqlocispatial
${QT_QTCORE_LIBRARY}
@@ -42,10 +42,9 @@
****************************************************************************/

#include "main.h"
#include <qsqldriverplugin.h>
#include "qsql_ocispatial.h"

QT_BEGIN_NAMESPACE

QOCISpatialDriverPlugin::QOCISpatialDriverPlugin()
: QSqlDriverPlugin()
{
@@ -60,12 +59,3 @@ QSqlDriver* QOCISpatialDriverPlugin::create( const QString &name )
}
return 0;
}

QStringList QOCISpatialDriverPlugin::keys() const
{
QStringList l;
l << QLatin1String( "QOCISPATIAL8" ) << QLatin1String( "QOCISPATIAL" );
return l;
}

QT_END_NAMESPACE
@@ -41,21 +41,16 @@
**
****************************************************************************/

#ifndef QOCISPATIAL_MAIN_H
#define QOCISPATIAL_MAIN_H

#include <QSqlDriverPlugin>
#include <QStringList>
#include <qsqldriverplugin.h>
#include "qsql_ocispatial.h"

class QOCISpatialDriverPlugin : public QSqlDriverPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA( IID "org.qt-project.Qt.QSqlDriverFactoryInterface" FILE "qocispatial.json" )

public:
QOCISpatialDriverPlugin();

QSqlDriver* create( const QString & );
QStringList keys() const;
};

#endif

0 comments on commit bd58bc3

Please sign in to comment.
You can’t perform that action at this time.