[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/akonadi/server
From:       Volker Krause <vkrause () kde ! org>
Date:       2010-08-14 14:31:10
Message-ID: 20100814143110.D8EC5AC854 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1163597 by vkrause:

Get rid of the ugly libakonadiprivate shared library. It was originally
introduced for unit tests, but we can just as well use a not installed
static lib for that.
Also helps preserving valuable resources on platforms with insane DLL or
FD limits.


 M  +1 -3      CMakeLists.txt  
 M  +1 -3      src/akonadi.h  
 M  +1 -2      src/akonadiconnection.h  
 D             src/akonadiprivate_export.h  
 M  +1 -2      src/handler.h  
 M  +1 -1      src/handler/akappend.h  
 M  +1 -1      src/handler/colcopy.h  
 M  +1 -1      src/handler/copy.h  
 M  +1 -2      src/handler/list.h  
 M  +1 -3      src/imapstreamparser.h  
 M  +2 -0      src/main.cpp  
 M  +1 -2      src/response.h  
 M  +1 -2      src/storage/datastore.h  
 M  +1 -3      src/storage/dbinitializer.h  
 M  +1 -3      src/storage/dbupdater.h  
 M  +3 -3      src/storage/entities-header.xsl  
 M  +0 -1      src/storage/entities.xsl  
 M  +1 -3      src/storage/entity.h  
 M  +1 -2      src/storage/querybuilder.h  
 M  +11 -0     tests/unittest/dbupdatertest.cpp  
 M  +2 -0      tests/unittest/dbupdatertest.h  
 M  +0 -2      tests/unittest/querybuildertest.cpp  


--- trunk/kdesupport/akonadi/server/CMakeLists.txt #1163596:1163597
@@ -166,7 +166,7 @@
 qt4_add_resources( libakonadiprivate_SRCS src/storage/akonadidb.qrc )
 
 
-automoc4_add_library( akonadiprivate SHARED ${libakonadiprivate_SRCS} )
+automoc4_add_library( akonadiprivate STATIC ${libakonadiprivate_SRCS} )
 
 target_link_libraries( akonadiprivate
   ${QT_QTCORE_LIBRARY}
@@ -189,8 +189,6 @@
                         DEFINE_SYMBOL MAKE_AKONADIPRIVATE_LIB
                       )
 
-install( TARGETS akonadiprivate ${INSTALL_TARGETS_DEFAULT_ARGS} )
-
 set( akonadiserver_bin_SRCS src/main.cpp
   ${AKONADI_SHARED_SOURCES} )
 
--- trunk/kdesupport/akonadi/server/src/akonadi.h #1163596:1163597
@@ -25,8 +25,6 @@
 
 #include <QtNetwork/QLocalServer>
 
-#include "akonadiprivate_export.h"
-
 class QProcess;
 class IntervalCheck;
 
@@ -37,7 +35,7 @@
 class SearchManager;
 class ItemRetrievalThread;
 
-class AKONADIPRIVATE_EXPORT AkonadiServer: public QLocalServer
+class AkonadiServer: public QLocalServer
 {
     Q_OBJECT
 
--- trunk/kdesupport/akonadi/server/src/akonadiconnection.h #1163596:1163597
@@ -23,7 +23,6 @@
 #include <QtCore/QThread>
 #include <QtNetwork/QLocalSocket>
 
-#include "akonadiprivate_export.h"
 #include "entities.h"
 #include "global.h"
 
@@ -37,7 +36,7 @@
 /**
     An AkonadiConnection represents one connection of a client to the server.
 */
-class AKONADIPRIVATE_EXPORT AkonadiConnection : public QThread
+class AkonadiConnection : public QThread
 {
     Q_OBJECT
 public:
--- trunk/kdesupport/akonadi/server/src/handler.h #1163596:1163597
@@ -24,7 +24,6 @@
 #include <QtCore/QObject>
 #include <QtCore/QStringList>
 
-#include "akonadiprivate_export.h"
 #include "global.h"
 #include "exception.h"
 
@@ -46,7 +45,7 @@
 
 /**
 The handler interfaces describes an entity capable of handling an AkonadiIMAP \
                command.*/
-class AKONADIPRIVATE_EXPORT Handler : public QObject {
+class Handler : public QObject {
     Q_OBJECT
 public:
     Handler();
--- trunk/kdesupport/akonadi/server/src/handler/akappend.h #1163596:1163597
@@ -34,7 +34,7 @@
   This command is used to append an item with multiple parts.
 
  */
-class AKONADIPRIVATE_EXPORT AkAppend : public Handler
+class AkAppend : public Handler
 {
   Q_OBJECT
 public:
--- trunk/kdesupport/akonadi/server/src/handler/colcopy.h #1163596:1163597
@@ -53,7 +53,7 @@
   There is only the usual status response indicating success or failure of the
   COLCOPY command
  */
-class AKONADIPRIVATE_EXPORT ColCopy : public Copy
+class ColCopy : public Copy
 {
   Q_OBJECT
   public:
--- trunk/kdesupport/akonadi/server/src/handler/copy.h #1163596:1163597
@@ -48,7 +48,7 @@
   There is only the usual status response indicating success or failure of the
   COPY command
  */
-class AKONADIPRIVATE_EXPORT Copy : public Handler
+class Copy : public Handler
 {
   Q_OBJECT
   public:
--- trunk/kdesupport/akonadi/server/src/handler/list.h #1163596:1163597
@@ -23,7 +23,6 @@
 #include <entities.h>
 #include <handler.h>
 #include <scope.h>
-#include "akonadiprivate_export.h"
 
 template <typename T> class QStack;
 
@@ -82,7 +81,7 @@
 
   The ancestors property is encoded as a list of UID/RID pairs.
 */
-class AKONADIPRIVATE_EXPORT List : public Handler
+class List : public Handler
 {
   Q_OBJECT
 
--- trunk/kdesupport/akonadi/server/src/imapstreamparser.h #1163596:1163597
@@ -21,8 +21,6 @@
 #ifndef AKONADI_IMAPSTREAMPARSER_P_H
 #define AKONADI_IMAPSTREAMPARSER_P_H
 
-#include "akonadiprivate_export.h"
-
 #include "imapset_p.h"
 
 #include <QtCore/QByteArray>
@@ -44,7 +42,7 @@
 /**
   Parser for IMAP messages that operates on a local socket stream.
 */
-class AKONADIPRIVATE_EXPORT ImapStreamParser
+class ImapStreamParser
 {
   friend class ::ImapStreamParserTest;
 
--- trunk/kdesupport/akonadi/server/src/main.cpp #1163596:1163597
@@ -47,6 +47,7 @@
 
 int main( int argc, char ** argv )
 {
+    Q_INIT_RESOURCE( akonadidb );
     AkApplication app( argc, argv );
     app.setDescription( QLatin1String( "Akonadi Server\nDo not run manually, use \
'akonadictl' instead to start/stop Akonadi." ) );  
@@ -82,5 +83,6 @@
 
     Akonadi::AkonadiServer::instance()->quit();
 
+    Q_CLEANUP_RESOURCE( akonadidb );
     return result;
 }
--- trunk/kdesupport/akonadi/server/src/response.h #1163596:1163597
@@ -20,7 +20,6 @@
 #define AKONADIRESPONSE_H
 
 #include <QtCore/QByteArray>
-#include "akonadiprivate_export.h"
 
 namespace Akonadi {
 
@@ -29,7 +28,7 @@
     Encapsulates the result of a command, including what to send
     back to the client.
  */
-class AKONADIPRIVATE_EXPORT Response{
+class Response{
     enum ResultCode {
         OK = 0,
         NO = 1,
--- trunk/kdesupport/akonadi/server/src/storage/datastore.h #1163596:1163597
@@ -28,7 +28,6 @@
 
 class QSqlQuery;
 
-#include "akonadiprivate_export.h"
 #include "entities.h"
 #include "notificationcollector.h"
 
@@ -86,7 +85,7 @@
   - StartServer: Start the database locally just for Akonadi instead of using an \
                existing one
   - ServerPath: Path to the server executable
 */
-class AKONADIPRIVATE_EXPORT DataStore : public QObject
+class DataStore : public QObject
 {
     Q_OBJECT
   public:
--- trunk/kdesupport/akonadi/server/src/storage/dbinitializer.h #1163596:1163597
@@ -27,8 +27,6 @@
 
 #include <boost/shared_ptr.hpp>
 
-#include "../akonadiprivate_export.h"
-
 class QDomElement;
 
 class DebugInterface
@@ -43,7 +41,7 @@
  * the file name of a template file and initializes the database
  * according to the rules in the template file.
  */
-class AKONADIPRIVATE_EXPORT DbInitializer
+class DbInitializer
 {
   public:
    typedef boost::shared_ptr<DbInitializer> Ptr;
--- trunk/kdesupport/akonadi/server/src/storage/dbupdater.h #1163596:1163597
@@ -24,8 +24,6 @@
 #include <QtCore/QStringList>
 #include <QtSql/QSqlDatabase>
 
-#include "../akonadiprivate_export.h"
-
 class QDomElement;
 
 /**
@@ -49,7 +47,7 @@
 /**
   Updates the database schema.
 */
-class AKONADIPRIVATE_EXPORT DbUpdater
+class DbUpdater
 {
   public:
     /**
--- trunk/kdesupport/akonadi/server/src/storage/entities-header.xsl #1163596:1163597
@@ -33,7 +33,7 @@
   </xsl:if>
   This class is implicitly shared.
 */
-class AKONADIPRIVATE_EXPORT <xsl:value-of select="$className"/> : private Entity
+class <xsl:value-of select="$className"/> : private Entity
 {
   friend class DataStore;
 
@@ -255,7 +255,7 @@
 <xsl:variable name="className"><xsl:value-of select="@name"/></xsl:variable>
 
 // debug stream operator
-AKONADIPRIVATE_EXPORT QDebug &amp; operator&lt;&lt;( QDebug&amp; d, const \
Akonadi::<xsl:value-of select="$className"/>&amp; entity ); +QDebug &amp; \
operator&lt;&lt;( QDebug&amp; d, const Akonadi::<xsl:value-of \
select="$className"/>&amp; entity );  </xsl:template>
 
 
@@ -268,7 +268,7 @@
   <xsl:value-of select="comment"/>
 */
 </xsl:if>
-class AKONADIPRIVATE_EXPORT <xsl:value-of select="$className"/>
+class <xsl:value-of select="$className"/>
 {
   public:
     // SQL table information
--- trunk/kdesupport/akonadi/server/src/storage/entities.xsl #1163596:1163597
@@ -38,7 +38,6 @@
 #ifndef AKONADI_ENTITIES_H
 #define AKONADI_ENTITIES_H
 #include &lt;storage/entity.h&gt;
-#include "akonadiprivate_export.h"
 
 #include &lt;QtCore/QDebug&gt;
 #include &lt;QtCore/QSharedDataPointer&gt;
--- trunk/kdesupport/akonadi/server/src/storage/entity.h #1163596:1163597
@@ -20,8 +20,6 @@
 #ifndef ENTITY_H
 #define ENTITY_H
 
-#include "../akonadiprivate_export.h"
-
 #include <QtCore/Qt>
 #include <QtCore/QDateTime>
 #include <QtCore/QDebug>
@@ -37,7 +35,7 @@
   Base class for classes representing database records. It also contains
   low-level data access and manipulation template methods.
 */
-class AKONADIPRIVATE_EXPORT Entity
+class Entity
 {
   public:
     typedef qint64 Id;
--- trunk/kdesupport/akonadi/server/src/storage/querybuilder.h #1163596:1163597
@@ -21,7 +21,6 @@
 #define AKONADI_QUERYBUILDER_H
 
 #include "query.h"
-#include "../akonadiprivate_export.h"
 
 #include <QtCore/QPair>
 #include <QtCore/QString>
@@ -39,7 +38,7 @@
 /**
   Helper class to construct arbitrary SQL queries.
 */
-class AKONADIPRIVATE_EXPORT QueryBuilder
+class QueryBuilder
 {
   public:
     enum QueryType {
--- trunk/kdesupport/akonadi/server/tests/unittest/dbupdatertest.cpp #1163596:1163597
@@ -22,11 +22,17 @@
 #include <QtCore/QDebug>
 #include <QtCore/QVariant>
 #include <QBuffer>
+#include <QDir>
 
 #include "storage/dbupdater.h"
 
 QTEST_MAIN( DbUpdaterTest )
 
+void DbUpdaterTest::initTestCase()
+{
+  Q_INIT_RESOURCE( akonadidb );
+}
+
 void DbUpdaterTest::testMysqlUpdateStatements()
 {
   const QSqlDatabase db = QSqlDatabase::addDatabase( QLatin1String( "QMYSQL" ) );
@@ -114,4 +120,9 @@
   QCOMPARE( updateSets.value( 17 ).statements.count(), 0 );
 }
 
+void DbUpdaterTest::cleanupTestCase()
+{
+  Q_CLEANUP_RESOURCE( akonadidb );
+}
+
 #include "dbupdatertest.moc"
--- trunk/kdesupport/akonadi/server/tests/unittest/dbupdatertest.h #1163596:1163597
@@ -28,8 +28,10 @@
   Q_OBJECT
 
   private Q_SLOTS:
+    void initTestCase();
     void testMysqlUpdateStatements();
     void testPsqlUpdateStatements();
+    void cleanupTestCase();
 };
 
 #endif
--- trunk/kdesupport/akonadi/server/tests/unittest/querybuildertest.cpp \
#1163596:1163597 @@ -21,8 +21,6 @@
 #include "querybuildertest.moc"
 
 #define QUERYBUILDER_UNITTEST
-// need to disable the DLL stuff
-#define AKONADIPRIVATE_EXPORT
 
 #include "storage/query.cpp"
 #include "storage/querybuilder.cpp"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic