fixed compilation on debian squeeze. Removed placeHolder properties in CreateGxsForumMsg.ui and GxsGroupDialog.ui which need to be set in the cpp. Added a new DEFINE=NO_SQLCIPHER to compile without sqlcipher when sqlcipher cannot be found (no sqlcipher is available on debian squeeze).

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7941 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-02-13 19:34:38 +00:00
parent 0d308ffa2e
commit 6585cfca2c
14 changed files with 75 additions and 32 deletions

View File

@ -143,6 +143,15 @@ linux-* {
target.path = $$LIB_DIR
INSTALLS *= target
SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes)
isEmpty(SQLCIPHER_OK) {
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
!exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
message(libsqlcipher.a not found. Compilation will not use SQLCIPER. Database will be unencrypted.)
DEFINES *= NO_SQLCIPHER
}
}
# where to put the librarys interface
include_rsiface.path = $${INC_DIR}
include_rsiface.files = $$PUBLIC_HEADERS

View File

@ -32,7 +32,10 @@
#include "rsdbbind.h"
//#define RETRODB_DEBUG
#ifndef NO_SQLCIPHER
#define ENABLE_ENCRYPTED_DB
#endif
const int RetroDb::OPEN_READONLY = SQLITE_OPEN_READONLY;
const int RetroDb::OPEN_READWRITE = SQLITE_OPEN_READWRITE;

View File

@ -24,7 +24,11 @@
*
*/
#ifdef NO_SQLCIPHER
#include <sqlite3.h>
#else
#include <sqlcipher/sqlite3.h>
#endif
#include <string>
#include <set>

View File

@ -26,7 +26,12 @@
#include <string>
#include <inttypes.h>
#ifdef NO_SQLCIPHER
#include <sqlite3.h>
#else
#include <sqlcipher/sqlite3.h>
#endif
class RetroBind
{

View File

@ -25,6 +25,7 @@
#include "gui/chat/ChatDialog.h"
#include "gui/settings/rsharesettings.h"
#include <algorithm>
#include <retroshare/rsnotify.h>
#include <retroshare/rsmsgs.h>

View File

@ -35,11 +35,27 @@
#include <retroshare-gui/RsAutoUpdatePage.h>
#include "RSGraphWidget.h"
#if QT_VERSION < 0x040700
#include <sys/time.h>
static qint64 getCurrentMSecsSinceEpoch()
{
timeval tv ;
gettimeofday(&tv,NULL) ;
return (qint64)tv.tv_sec + (qint64)tv.tv_usec/1000 ;
}
#endif
RSGraphSource::RSGraphSource()
{
_time_limit_msecs = 10*1000 ;
_update_period_msecs = 1*1000 ;
#if QT_VERSION < 0x040700
_time_orig_msecs = getCurrentMSecsSinceEpoch() ;
#else
_time_orig_msecs = QDateTime::currentMSecsSinceEpoch() ;
#endif
_timer = new QTimer ;
_digits = 2 ;
@ -140,7 +156,11 @@ if(_source != NULL)
qint64 RSGraphSource::getTime() const
{
#if QT_VERSION < 0x040700
return getCurrentMSecsSinceEpoch() - _time_orig_msecs ;
#else
return QDateTime::currentMSecsSinceEpoch() - _time_orig_msecs ;
#endif
}
void RSGraphSource::updateIfPossible()

View File

@ -26,7 +26,7 @@
#include "gui/gxs/RsGxsUpdateBroadcastBase.h"
#include <iostream>
//#include <algorithm>
#include <algorithm>
/**
* #define DEBUG_ITEM 1

View File

@ -113,9 +113,6 @@
</item>
<item>
<widget class="QLineEdit" name="groupName">
<property name="placeholderText">
<string>Set a descriptive title here</string>
</property>
</widget>
</item>
</layout>
@ -475,9 +472,6 @@
<layout class="QVBoxLayout">
<item>
<widget class="MimeTextEdit" name="groupDesc">
<property name="placeholderText" stdset="0">
<string/>
</property>
</widget>
</item>
</layout>

View File

@ -28,7 +28,7 @@
#include "gui/gxs/RsGxsUpdateBroadcastBase.h"
#include <iostream>
//#include <algorithm>
#include <algorithm>
/**
* #define DEBUG_ITEM 1

View File

@ -870,7 +870,11 @@ void GxsIdDetails::getIcons(const RsIdentityDetails &details, QList<QIcon> &icon
QPixmap pix ;
if(details.mAvatar.mSize == 0 || !pix.loadFromData(details.mAvatar.mData, details.mAvatar.mSize, "PNG"))
#if QT_VERSION < 0x040700
pix = QPixmap::fromImage(makeDefaultIcon(details.mId));
#else
pix.convertFromImage(makeDefaultIcon(details.mId));
#endif
QIcon idIcon(pix);

View File

@ -19,6 +19,7 @@
* Boston, MA 02110-1301, USA.
****************************************************************/
#include <algorithm>
#include <QApplication>
#include "GxsMessageFramePostWidget.h"

View File

@ -77,9 +77,6 @@
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="forumSubject">
<property name="placeholderText">
<string>Set a descriptive subject here</string>
</property>
</widget>
</item>
<item row="1" column="1">

View File

@ -83,16 +83,18 @@ linux-* {
isEmpty(SQLCIPHER_OK) {
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
! exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
message(../../../lib/sqlcipher/.libs/libsqlcipher.a does not exist)
error(Please fix this and try again. Will stop now.)
}
exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
DEPENDPATH += ../../../lib/sqlcipher/src/
INCLUDEPATH += ../../../lib/sqlcipher/src/
DEPENDPATH += ../../../lib/sqlcipher/tsrc/
INCLUDEPATH += ../../../lib/sqlcipher/tsrc/
} else {
message(libsqlcipher.a not found. Compilation will not use SQLCIPHER. Database will be unencrypted.)
DEFINES *= NO_SQLCIPHER
LIBS *= -lsqlite3
}
} else {
LIBS += -lsqlcipher

View File

@ -36,16 +36,19 @@ linux-* {
isEmpty(SQLCIPHER_OK) {
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
! exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
message(../../../lib/sqlcipher/.libs/libsqlcipher.a does not exist)
error(Please fix this and try again. Will stop now.)
}
exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
DEPENDPATH += ../../../lib/sqlcipher/src/
INCLUDEPATH += ../../../lib/sqlcipher/src/
} else {
LIBS += -lsqlcipher
message(libsqlcipher.a not found. Compilation will not use SQLCIPHER. Database will be unencrypted.)
DEFINES *= NO_SQLCIPHER
LIBS *= -lsqlite3
}
} else {
LIBS *= -lsqlcipher
}
}
}