mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-05 04:44:19 -04:00
Removed some more compiler warnings from Windows compile (GCC 4.4).
Added -Wextra to the Windows compile. Added new define in libbitdht for snprintf and fprintf to proper handling of "%ll" under Windows. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4951 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2d2b7230d1
commit
970d88200d
35 changed files with 170 additions and 125 deletions
|
@ -22,6 +22,10 @@ minimal {
|
|||
DEFINES += MINIMAL_RSGUI
|
||||
}
|
||||
|
||||
# treat warnings as error for better removing
|
||||
#QMAKE_CFLAGS += -Werror
|
||||
#QMAKE_CXXFLAGS += -Werror
|
||||
|
||||
################################# Linux ##########################################
|
||||
# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib
|
||||
linux-* {
|
||||
|
@ -91,36 +95,40 @@ win32-x-g++ {
|
|||
#################################### Windows #####################################
|
||||
|
||||
win32 {
|
||||
# Switch off optimization for release version
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||
QMAKE_CXXFLAGS_RELEASE += -O0
|
||||
QMAKE_CFLAGS_RELEASE -= -O2
|
||||
QMAKE_CFLAGS_RELEASE += -O0
|
||||
# Switch on extra warnings
|
||||
QMAKE_CFLAGS += -Wextra
|
||||
QMAKE_CXXFLAGS += -Wextra
|
||||
|
||||
# Switch on optimization for debug version
|
||||
#QMAKE_CXXFLAGS_DEBUG += -O2
|
||||
#QMAKE_CFLAGS_DEBUG += -O2
|
||||
# Switch off optimization for release version
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||
QMAKE_CXXFLAGS_RELEASE += -O0
|
||||
QMAKE_CFLAGS_RELEASE -= -O2
|
||||
QMAKE_CFLAGS_RELEASE += -O0
|
||||
|
||||
OBJECTS_DIR = temp/obj
|
||||
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
|
||||
#QTPLUGIN += qjpeg
|
||||
# Switch on optimization for debug version
|
||||
#QMAKE_CXXFLAGS_DEBUG += -O2
|
||||
#QMAKE_CFLAGS_DEBUG += -O2
|
||||
|
||||
PRE_TARGETDEPS += ../../libretroshare/src/lib/libretroshare.a
|
||||
OBJECTS_DIR = temp/obj
|
||||
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
|
||||
#QTPLUGIN += qjpeg
|
||||
|
||||
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||
LIBS += -L"../../../../lib"
|
||||
LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz
|
||||
PRE_TARGETDEPS += ../../libretroshare/src/lib/libretroshare.a
|
||||
|
||||
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
||||
LIBS += -L"../../../../lib"
|
||||
LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz
|
||||
# added after bitdht
|
||||
# LIBS += -lws2_32
|
||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
|
||||
LIBS += -lole32 -lwinmm
|
||||
RC_FILE = gui/images/retroshare_win.rc
|
||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
|
||||
LIBS += -lole32 -lwinmm
|
||||
RC_FILE = gui/images/retroshare_win.rc
|
||||
|
||||
DEFINES += WINDOWS_SYS
|
||||
DEFINES += WINDOWS_SYS
|
||||
|
||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
INCLUDEPATH += . $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
|
||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||
GPGME_DIR = ../../../../gpgme-1.1.8
|
||||
INCLUDEPATH += . $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
|
||||
}
|
||||
|
||||
##################################### MacOS ######################################
|
||||
|
|
|
@ -285,13 +285,13 @@ void AWidget::addBlob(int x, int y, int radius, int height) {
|
|||
|
||||
// Set up the pointers
|
||||
int *newptr;
|
||||
int *oldptr;
|
||||
// int *oldptr;
|
||||
if (page == 0) {
|
||||
newptr = &heightField1.front();
|
||||
oldptr = &heightField2.front();
|
||||
// oldptr = &heightField2.front();
|
||||
} else {
|
||||
newptr = &heightField2.front();
|
||||
oldptr = &heightField1.front();
|
||||
// oldptr = &heightField1.front();
|
||||
}
|
||||
|
||||
int rquad = radius * radius;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#define IMAGE_UNSUBSCRIBE ""
|
||||
|
||||
ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WFlags flags)
|
||||
: RsAutoUpdatePage(5000,parent)
|
||||
: RsAutoUpdatePage(5000, parent, flags)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
|
@ -330,7 +330,7 @@ void ChatLobbyWidget::unsubscribeItem()
|
|||
rsMsgs->unsubscribeChatLobby(id);
|
||||
}
|
||||
|
||||
void ChatLobbyWidget::itemDoubleClicked(QTreeWidgetItem *item, int column)
|
||||
void ChatLobbyWidget::itemDoubleClicked(QTreeWidgetItem *item, int /*column*/)
|
||||
{
|
||||
subscribeLobby(item);
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
bool RsAutoUpdatePage::_locked = false ;
|
||||
|
||||
RsAutoUpdatePage::RsAutoUpdatePage(int ms_update_period,QWidget *parent)
|
||||
: MainPage(parent)
|
||||
RsAutoUpdatePage::RsAutoUpdatePage(int ms_update_period, QWidget *parent, Qt::WindowFlags flags)
|
||||
: MainPage(parent, flags)
|
||||
{
|
||||
_timer = new QTimer ;
|
||||
_timer->setInterval(ms_update_period);
|
||||
|
|
|
@ -18,7 +18,7 @@ class RsAutoUpdatePage: public MainPage
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RsAutoUpdatePage(int ms_update_period = 1000,QWidget *parent=NULL) ;
|
||||
RsAutoUpdatePage(int ms_update_period = 1000, QWidget *parent = NULL, Qt::WindowFlags flags = 0) ;
|
||||
virtual ~RsAutoUpdatePage() ;
|
||||
|
||||
virtual void updateDisplay() {}
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
static void closeChat(const std::string &peerId);
|
||||
static void chatChanged(int list, int type);
|
||||
|
||||
virtual void showDialog(uint chatflags) {}
|
||||
virtual void showDialog(uint /*chatflags*/) {}
|
||||
|
||||
virtual ChatWidget *getChatWidget() = 0;
|
||||
virtual bool hasPeerStatus() = 0;
|
||||
|
@ -79,7 +79,7 @@ protected:
|
|||
virtual bool canClose() { return true; }
|
||||
|
||||
virtual void init(const std::string &peerId, const QString &title);
|
||||
virtual void onChatChanged(int list, int type) {}
|
||||
virtual void onChatChanged(int /*list*/, int /*type*/) {}
|
||||
|
||||
virtual void addIncomingChatMsg(const ChatInfo& info) = 0;
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@ void PopupChatWindow::getAvatar()
|
|||
}
|
||||
}
|
||||
|
||||
void PopupChatWindow::tabClosed(ChatDialog *dialog)
|
||||
void PopupChatWindow::tabClosed(ChatDialog */*dialog*/)
|
||||
{
|
||||
if (tabbedWindow) {
|
||||
if (ui.tabWidget->count() == 0) {
|
||||
|
|
|
@ -30,7 +30,7 @@ class MainPage : public QWidget
|
|||
{
|
||||
public:
|
||||
/** Default Constructor */
|
||||
MainPage(QWidget *parent = 0) : QWidget(parent) {}
|
||||
MainPage(QWidget *parent = 0, Qt::WindowFlags flags = 0) : QWidget(parent, flags) {}
|
||||
|
||||
virtual void retranslateUi() {}
|
||||
};
|
||||
|
|
|
@ -446,13 +446,6 @@ void NotifyQt::notifyListPreChange(int list, int /*type*/)
|
|||
void NotifyQt::UpdateGUI()
|
||||
{
|
||||
#ifndef MINIMAL_RSGUI
|
||||
/* hack to force updates until we've fixed that part */
|
||||
static time_t lastTs = 0;
|
||||
|
||||
// std::cerr << "Got update signal t=" << lastTs << std::endl ;
|
||||
|
||||
lastTs = time(NULL) ;
|
||||
|
||||
static bool already_updated = false ; // these only update once at start because they may already have been set before
|
||||
// the gui is running, then they get updated by callbacks.
|
||||
if(!already_updated)
|
||||
|
@ -656,9 +649,6 @@ void NotifyQt::runningTick()
|
|||
{
|
||||
// QMutexLocker lock(&runningToasterMutex);
|
||||
|
||||
QDesktopWidget *desktop = QApplication::desktop();
|
||||
QRect desktopGeometry = desktop->availableGeometry(desktop->primaryScreen());
|
||||
|
||||
int interval = runningToasterTimer->interval();
|
||||
QPoint diff;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ RelayPage::RelayPage(QWidget * parent, Qt::WFlags flags)
|
|||
}
|
||||
|
||||
/** Saves the changes on this page */
|
||||
bool RelayPage::save(QString &errmsg)
|
||||
bool RelayPage::save(QString &/*errmsg*/)
|
||||
{
|
||||
|
||||
int nFriends = ui.noFriendSpinBox->value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue