fixed possible compilation problem (bug #1910619),

fixed compilation error when building univeral binaries


git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@185 b624d157-de02-0410-bad0-e51aec6abb33
master
tarek_saidi 17 years ago
parent d359363e7f
commit fc2d6e07b7
  1. 5
      src/KpxConfig.cpp
  2. 3
      src/dialogs/PasswordGenDlg.cpp
  3. 2
      src/src.pro

@ -222,8 +222,9 @@ QRect KpxConfig::dialogGeometry(const QWidget* widget){
if (size.width() < minSize.width() || size.height() < minSize.height()) if (size.width() < minSize.width() || size.height() < minSize.height())
size = minSize; size = minSize;
} }
QRect rect(QPoint(), size); QRect rect;
rect=QRect(QPoint(), size);
rect.moveCenter( widget->parentWidget()->window()->geometry().center() ); rect.moveCenter( widget->parentWidget()->window()->geometry().center() );
return rect; return rect;
} }

@ -247,7 +247,8 @@ void CGenPwDialog::estimateQuality(){
num=Edit_chars->text().length(); num=Edit_chars->text().length();
float bits=0; float bits=0;
if(num)bits=log(num)/log(2); if(num)
bits=log((float)num)/log(2.0f);
bits=bits*((float)Spin_Num->value()); bits=bits*((float)Spin_Num->value());
Progress_Quali->setFormat(tr("%1 Bits").arg((int)bits)); Progress_Quali->setFormat(tr("%1 Bits").arg((int)bits));
Progress_Quali->update(); Progress_Quali->update();

@ -78,7 +78,9 @@ macx {
CONFIG += app_bundle CONFIG += app_bundle
isEqual(ARCH,UNIVERSAL) { isEqual(ARCH,UNIVERSAL) {
CONFIG += x86 ppc CONFIG += x86 ppc
# lipo cannot handle precompiled headers (yet)
CONFIG -= precompile_header CONFIG -= precompile_header
QMAKE_CXXFLAGS += -include keepassx.h
} }
isEqual(ARCH,INTEL): CONFIG += x86 isEqual(ARCH,INTEL): CONFIG += x86
isEqual(ARCH,PPC): CONFIG += ppc isEqual(ARCH,PPC): CONFIG += ppc