Merge pull request #66 from TheOneRing/snore
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 27 Mar 2014 20:42:39 +0000 (21:42 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 27 Mar 2014 20:42:39 +0000 (21:42 +0100)
Fixed detection of snore for Qt4/Qt5

src/common/logbacktrace_win.cpp
src/common/peer.h
src/common/transfer.h
src/common/types.h
src/core/sslserver.cpp

index fd365af..26951cd 100644 (file)
@@ -38,6 +38,7 @@ void loadHelpStackFrame(IMAGEHLP_STACK_FRAME &ihsf, const STACKFRAME64 &stackFra
 
 BOOL CALLBACK EnumSymbolsCB(PSYMBOL_INFO symInfo, ULONG size, PVOID user)
 {
+    Q_UNUSED(size)
     QStringList *params = (QStringList *)user;
     if (symInfo->Flags & SYMFLAG_PARAMETER) {
         params->append(symInfo->Name);
@@ -54,6 +55,7 @@ struct EnumModulesContext {
 
 BOOL CALLBACK EnumModulesCB(LPCSTR ModuleName, DWORD64 BaseOfDll, PVOID UserContext)
 {
+    Q_UNUSED(ModuleName)
     IMAGEHLP_MODULE64 mod;
     EnumModulesContext *context = (EnumModulesContext *)UserContext;
     mod.SizeOfStruct = sizeof(IMAGEHLP_MODULE64);
@@ -124,7 +126,7 @@ Label:
     StackFrame.AddrFrame.Mode   = AddrModeFlat;
     StackFrame.AddrStack.Offset = Context.Esp;
     StackFrame.AddrStack.Mode   = AddrModeFlat;
-#elif _M_X64
+#elif defined(_M_X64)
     MachineType                 = IMAGE_FILE_MACHINE_AMD64;
     StackFrame.AddrPC.Offset    = Context.Rip;
     StackFrame.AddrPC.Mode      = AddrModeFlat;
@@ -132,7 +134,7 @@ Label:
     StackFrame.AddrFrame.Mode   = AddrModeFlat;
     StackFrame.AddrStack.Offset = Context.Rsp;
     StackFrame.AddrStack.Mode   = AddrModeFlat;
-#elif _M_IA64
+#elif defined(_M_IA64)
     MachineType                 = IMAGE_FILE_MACHINE_IA64;
     StackFrame.AddrPC.Offset    = Context.StIIP;
     StackFrame.AddrPC.Mode      = AddrModeFlat;
index de9a4b6..2bdcc56 100644 (file)
@@ -82,6 +82,10 @@ private:
     QPointer<AuthHandler> _authHandler;
 };
 
+// We need to special-case Peer* in attached signals/slots, so typedef it for the meta type system
+typedef Peer * PeerPtr;
+Q_DECLARE_METATYPE(PeerPtr)
+
 
 // Template method needed in the header
 template<typename T> inline
index 31421cd..cacfeaa 100644 (file)
@@ -24,8 +24,8 @@
 #include <QHostAddress>
 #include <QUuid>
 
+#include "peer.h"
 #include "syncableobject.h"
-#include "types.h"
 
 class Transfer : public SyncableObject
 {
index 290d53f..a63e296 100644 (file)
 #include <QHostAddress>
 #include <QDataStream>
 
-#include "peer.h"
-
-// We need to special-case Peer* in attached signals/slots, so typedef it for the meta type system
-typedef Peer * PeerPtr;
-Q_DECLARE_METATYPE(PeerPtr)
-
 class SignedId
 {
 protected:
index 997578a..203c377 100644 (file)
@@ -24,6 +24,7 @@
 #  include <QSslSocket>
 #endif
 
+#include <QDateTime>
 #include <QFile>
 
 #include "logger.h"