Bug #33

Patch to use Q_OS_MAC instead of Q_OS_MACOS

Added by Richard Johnson almost 7 years ago. Updated over 6 years ago.

Target version:
Operating System:
Mac OS
Affected version:
Affected revision:


I built KeePassX 2 current source as of 2012-07-14 using the following
Qt installs:
macports qt4-mac @4.7.4_1+quartz+universal
macports qt4-mac @4.8.2_0+quartz+universal
nokia release qt-mac-opensource-4.8.2.dmg
My build machine is Mac OS X 10.6.8 with Xcode 3.2.6

With each Qt version, linking failed. src/gui/Clipboard.cpp was
attempting to include QtDBus, which is not present.

A bit of testing shows the QtDBus inclusion is attempted because
Q_OS_MACOS is not defined. Q_OS_MACOS is also used in three additional
files to attempt to switch on or off Mac-specific behavior.

Tracing back to see why it's not defined, we find a possible typo in 4
KeePassX source files.

QGLOBAL_H is defined during build, so <QtCore/qglobal.h> is being
referenced successfully upstream. In qglobal.h, Q_OS_DARWIN is defined
successfully based on presence of APPLE and one of 3 compiler name
defines. Finally, in qglobal.h, Q_OS_DARWIN is used to, among other things,
define Q_OS_MAC, not Q_OS_MACOS.

The patch below changes the six recently created Q_OS_MACOS references
in KeePassX current source to Q_OS_MAC. The resulting binary builds and
runs properly as far as I can tell in my limited testing.

======= ><8 =======

patch-keepassx-Q_OS_MAC-fix-for-1.9.81-aka-2-alpha-2.txt Magnifier (3.8 KB) Richard Johnson, 07/16/2012 07:50 AM

Associated revisions

Revision 965dba63
Added by Felix Geyer almost 7 years ago

Use Q_OS_MAC instead of the nonexistent Q_OS_MACOS.

Thanks to Richard Johnson for spotting this.

Closes #33


#1 Updated by Felix Geyer almost 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#2 Updated by Florian Geyer over 6 years ago

  • Description updated (diff)
  • Target version set to 2.0 Alpha 3

Also available in: Atom PDF