Completely removed Qt3Support dependency

Cleaned up qmake project file
Compiles on Windows + many Windows specific improvements
Various small fixes

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@152 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 17 years ago
parent 18e99b5a41
commit 97da5c1989
  1. BIN
      share/ico/keepassx.ico
  2. 1
      share/ico/keepassx.rc
  3. 41
      src/dialogs/AboutDlg.cpp
  4. 5
      src/forms/AboutDlg.ui
  5. 2
      src/forms/EditGroupDlg.ui
  6. 2
      src/forms/SimplePasswordDlg.ui
  7. 4
      src/lib/ShortcutWidget.cpp
  8. 3
      src/lib/ShortcutWidget.h
  9. 94
      src/main.cpp
  10. 3
      src/main.h
  11. 26
      src/mainwindow.cpp
  12. 1
      src/mainwindow.h
  13. 267
      src/src.pro

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "keepassx.ico"

@ -42,7 +42,7 @@ AboutDialog::AboutDialog(QWidget* parent):QDialog(parent)
AboutTr+="<br>"; AboutTr+="<br>";
} }
Edit_Translation->setHtml(AboutTr+tr("Information on how to translate KeePassX can be found under:") Edit_Translation->setHtml(AboutTr+tr("Information on how to translate KeePassX can be found under:")
+"<br>http://keepassx.sourceforge.net/"); +"<br>http://www.keepassx.org/");
QString str; QString str;
str+="<b>"+tr("Team")+"</b><br>"; str+="<b>"+tr("Team")+"</b><br>";
str+="<div style='margin-left:10px;'>"; str+="<div style='margin-left:10px;'>";
@ -77,34 +77,29 @@ close();
} }
void AboutDialog::loadLicFromFile(){ void AboutDialog::loadLicFromFile(){
QString filename;
filename = AppDir+"/../share/keepass/license.html";
if (!QFile::exists(filename)){
filename = AppDir+"/share/license.html";
if (!QFile::exists(filename)){
filename.clear();
}
}
QFile gpl(filename);
if (filename.isEmpty() || !gpl.open(QIODevice::ReadOnly)){
QMessageBox::critical(this,tr("Error"),tr("File '%1' could not be found.")
.arg("'license.html'")+"\n"+tr("Make sure that the program is installed correctly.")
,tr("OK"),0,0,2,1);
}
QFile gpl(AppDir+"/../share/keepass/license.html"); Edit_License->setHtml(QString::fromUtf8(gpl.readAll()));
if(!gpl.exists()){
QMessageBox::critical(this,tr("Error"),tr("File '%1' could not be found.")
.arg("'license.html'")+"\n"+tr("Make sure that the program is installed correctly.")
,tr("OK"),0,0,2,1);
return;
}
if(!gpl.open(QIODevice::ReadOnly)){
QMessageBox::critical(this,tr("Error"),tr("Could not open file '%1'")
.arg("'license.txt'")+"\n"+tr("The following error occured:")+"\n"+gpl.errorString()
,tr("OK"),0,0,2,1);
return;
}
char* buffer=new char[gpl.size()];
long l=gpl.read(buffer,gpl.size());
gpl.close();
Edit_License->setHtml(QString::fromUtf8(buffer,l));
delete buffer;
} }
void AboutDialog::OnHomepageClicked(){ void AboutDialog::OnHomepageClicked(){
openBrowser("http://keepassx.sf.net"); openBrowser("http://www.keepassx.org/");
} }
void AboutDialog::OnEMailClicked(){ void AboutDialog::OnEMailClicked(){
openBrowser("mailto:keepassx@gmail.com"); openBrowser("mailto:keepassx@gmail.com");
} }

@ -65,7 +65,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget" > <widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" > <property name="currentIndex" >
<number>3</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tab" > <widget class="QWidget" name="tab" >
<attribute name="title" > <attribute name="title" >
@ -184,9 +184,6 @@
<property name="text" > <property name="text" >
<string>http://keepassx.sourceforge.net</string> <string>http://keepassx.sourceforge.net</string>
</property> </property>
<property name="buddy" >
<cstring></cstring>
</property>
</widget> </widget>
</item> </item>
<item> <item>

@ -132,11 +132,11 @@
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11" /> <layoutdefault spacing="6" margin="11" />
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<tabstops> <tabstops>
<tabstop>EditTitle</tabstop> <tabstop>EditTitle</tabstop>
<tabstop>ComboIconPicker</tabstop> <tabstop>ComboIconPicker</tabstop>
</tabstops> </tabstops>
<includes/>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

@ -125,7 +125,7 @@
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11" /> <layoutdefault spacing="6" margin="11" />
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction> <includes/>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

@ -18,12 +18,14 @@
***************************************************************************/ ***************************************************************************/
#include "ShortcutWidget.h" #include "ShortcutWidget.h"
#if defined(GLOBAL_AUTOTYPE) && defined(Q_WS_X11)
#include <QKeyEvent> #include <QKeyEvent>
#include <QX11Info> #include <QX11Info>
#include <QPalette> #include <QPalette>
#include "HelperX11.h" #include "HelperX11.h"
#if defined(GLOBAL_AUTOTYPE) && defined(Q_WS_X11)
ShortcutWidget::ShortcutWidget(QWidget* parent) : QLineEdit(parent), lock(false), failed(false){ ShortcutWidget::ShortcutWidget(QWidget* parent) : QLineEdit(parent), lock(false), failed(false){
} }

@ -21,7 +21,10 @@
#define SHORTCUT_WIDGET_H #define SHORTCUT_WIDGET_H
#include <QLineEdit> #include <QLineEdit>
#if defined(GLOBAL_AUTOTYPE) && defined(Q_WS_X11)
#include "lib/AutoType.h" #include "lib/AutoType.h"
#endif
class ShortcutWidget : public QLineEdit{ class ShortcutWidget : public QLineEdit{
Q_OBJECT Q_OBJECT

@ -52,6 +52,9 @@
#if defined(Q_WS_X11) && defined(GLOBAL_AUTOTYPE) #if defined(Q_WS_X11) && defined(GLOBAL_AUTOTYPE)
#include "Application_X11.h" #include "Application_X11.h"
#endif #endif
#ifdef Q_WS_WIN
#include <windows.h>
#endif
using namespace std; using namespace std;
@ -60,6 +63,7 @@ QHash<QString,QIcon*>IconCache;
KpxConfig *config; KpxConfig *config;
QString AppDir; QString AppDir;
QString HomeDir;
QString PluginLoadError; QString PluginLoadError;
bool TrActive; bool TrActive;
QString DetailViewTemplate; QString DetailViewTemplate;
@ -78,6 +82,15 @@ int main(int argc, char **_argv)
QString ArgFile,ArgCfg,ArgLang,IniFilename; QString ArgFile,ArgCfg,ArgLang,IniFilename;
QApplication* app=NULL; QApplication* app=NULL;
AppDir=applicationDirPath(); AppDir=applicationDirPath();
#if defined Q_WS_WIN
HomeDir = QString::fromLocal8Bit(qgetenv("APPDATA").constData());
if(!HomeDir.isEmpty() && QFile::exists(HomeDir))
HomeDir = QDir::fromNativeSeparators(HomeDir)+"/KeePassX";
else
HomeDir = QDir::homePath()+"/KeePassX";
#else
HomeDir = QDir::homePath()+"/.keepassx";
#endif
bool ArgMin = false; bool ArgMin = false;
bool ArgLock = false; bool ArgLock = false;
parseCmdLineArgs(argc,argv,ArgFile,ArgCfg,ArgLang,ArgMin,ArgLock); parseCmdLineArgs(argc,argv,ArgFile,ArgCfg,ArgLang,ArgMin,ArgLock);
@ -85,12 +98,12 @@ int main(int argc, char **_argv)
//Load Config //Load Config
if(ArgCfg.isEmpty()){ if(ArgCfg.isEmpty()){
if(!QDir(QDir::homePath()+"/.keepassx").exists()){ if(!QDir(HomeDir).exists()){
QDir conf(QDir::homePath()); QDir conf(QDir::homePath());
if(!conf.mkdir(".keepassx")){ if(!QDir().mkpath(HomeDir))
cout << "Warning: Could not create directory '~/.keepassx'." << endl;} qDebug("Warning: Could not create directory '%s'", CSTR(HomeDir));
} }
IniFilename=QDir::homePath()+"/.keepassx/config"; IniFilename=HomeDir+"/config";
} }
else else
IniFilename=ArgCfg; IniFilename=ArgCfg;
@ -163,8 +176,9 @@ int main(int argc, char **_argv)
qtTranslator=new QTranslator; qtTranslator=new QTranslator;
if(loadTranslation(translator,"keepass-",loc.name(),QStringList() if(loadTranslation(translator,"keepass-",loc.name(),QStringList()
<< app->applicationDirPath()+"/../share/keepass/i18n/" << AppDir+"/../share/keepass/i18n/"
<< QDir::homePath()+"/.keepassx/" )) << AppDir+"/share/i18n/"
<< HomeDir))
{ {
app->installTranslator(translator); app->installTranslator(translator);
TrActive=true; TrActive=true;
@ -178,17 +192,20 @@ int main(int argc, char **_argv)
TrActive=false; TrActive=false;
} }
if(loadTranslation(qtTranslator,"qt_",loc.name(),QStringList() if(TrActive){
<< QLibraryInfo::location(QLibraryInfo::TranslationsPath) if(loadTranslation(qtTranslator,"qt_",loc.name(),QStringList()
<< app->applicationDirPath()+"/../share/keepass/i18n/" << QLibraryInfo::location(QLibraryInfo::TranslationsPath)
<< QDir::homePath()+"/.keepass/" )) << AppDir+"/../share/keepass/i18n/"
app->installTranslator(qtTranslator); << AppDir+"/share/i18n/"
else{ << HomeDir))
if(loc.name()!="en_US") app->installTranslator(qtTranslator);
qWarning(QString("Qt: No Translation found for '%1 (%2)' using 'English (UnitedStates)'") else{
.arg(QLocale::languageToString(loc.language())) if(loc.name()!="en_US")
.arg(QLocale::countryToString(loc.country())).toAscii()); qWarning(QString("Qt: No Translation found for '%1 (%2)' using 'English (UnitedStates)'")
delete qtTranslator; .arg(QLocale::languageToString(loc.language()))
.arg(QLocale::countryToString(loc.country())).toAscii());
delete qtTranslator;
}
} }
@ -281,7 +298,7 @@ void openBrowser(const QString& UrlString){
QUrl url(UrlString); QUrl url(UrlString);
if(url.scheme().isEmpty()) if(url.scheme().isEmpty())
url=QUrl("http://"+UrlString); url=QUrl("http://"+UrlString);
if(config->urlCmdDef()){ if(config->urlCmdDef() || url.scheme()=="mailto"){
QDesktopServices::openUrl(url); QDesktopServices::openUrl(url);
} }
else{ else{
@ -297,22 +314,22 @@ void openBrowser(const QString& UrlString){
} }
} }
///TODO 0.2.3 remove QString getImageFile(const QString& name){
void loadImg(QString name,QPixmap& Img){ if (QFile::exists(AppDir+"/../share/keepass/icons/"+name))
if(Img.load(AppDir+"/../share/keepass/icons/"+name)==false){ return AppDir+"/../share/keepass/icons/"+name;
if(Img.load(AppDir+"/share/"+name)==false){ else if (QFile::exists(AppDir+"/share/icons/"+name))
QMessageBox::critical(0,QApplication::translate("Main","Error"), return AppDir+"/share/icons/"+name;
QApplication::translate("Main","File '%1' could not be found.") else{
.arg(name),QApplication::translate("Main","OK"),0,0,2,1); QMessageBox::critical(0,QApplication::translate("Main","Error"),
exit(1); QApplication::translate("Main","File '%1' could not be found.")
} .arg(name),QApplication::translate("Main","OK"),0,0,2,1);
exit(1);
} }
} }
///TODO 0.2.3 remove ///TODO 0.2.3 remove
void loadImages(){ void loadImages(){
QPixmap tmpImg; QPixmap tmpImg(getImageFile("clientic.png"));
loadImg("clientic.png",tmpImg);
EntryIcons=new QPixmap[BUILTIN_ICONS]; EntryIcons=new QPixmap[BUILTIN_ICONS];
for(int i=0;i<BUILTIN_ICONS;i++){ for(int i=0;i<BUILTIN_ICONS;i++){
EntryIcons[i]=tmpImg.copy(i*16,0,16,16);} EntryIcons[i]=tmpImg.copy(i*16,0,16,16);}
@ -336,12 +353,7 @@ const QIcon& getIcon(const QString& name){
}*/ }*/
if(!NewIcon) if(!NewIcon)
{ {
QFileInfo IconFile(AppDir+"/../share/keepass/icons/"+name+".png"); NewIcon=new QIcon(getImageFile(name+".png"));
if(!IconFile.isFile() || !IconFile.exists() || !IconFile.isReadable()){
///TODO 0.2.3 error handling
qWarning("%s",CSTR(name));
}
NewIcon=new QIcon(AppDir+"/../share/keepass/icons/"+name+".png");
IconCache.insert(name,NewIcon); IconCache.insert(name,NewIcon);
} }
return *NewIcon; return *NewIcon;
@ -351,11 +363,7 @@ const QPixmap* getPixmap(const QString& name){
QPixmap* CachedPixmap=PixmapCache.value(name); QPixmap* CachedPixmap=PixmapCache.value(name);
if(CachedPixmap) if(CachedPixmap)
return CachedPixmap; return CachedPixmap;
QImage img; QImage img(getImageFile(name+".png"));
if(!img.load(AppDir+"/../share/keepass/icons/"+name+".png")){
///TODO 0.2.3 error handling
qWarning("%s",CSTR(name));
}
QPixmap* NewPixmap=new QPixmap(QPixmap::fromImage(img)); QPixmap* NewPixmap=new QPixmap(QPixmap::fromImage(img));
PixmapCache.insert(name,NewPixmap); PixmapCache.insert(name,NewPixmap);
return NewPixmap; return NewPixmap;
@ -380,7 +388,7 @@ bool loadTranslation(QTranslator* tr,const QString& prefix,const QString& loc,co
void printHelp(){ void printHelp(){
cout << "KeePassX" << APP_VERSION << endl; cout << "KeePassX" << APP_VERSION << endl;
cout << "Usage: keepass [Filename] [Options]" << endl; cout << "Usage: keepassx [Filename] [Options]" << endl;
cout << " -help This Help" << endl; cout << " -help This Help" << endl;
cout << " -cfg <CONFIG> Use specified file for loading/saving the configuration." << endl; cout << " -cfg <CONFIG> Use specified file for loading/saving the configuration." << endl;
cout << " -min Start minimized." << endl; cout << " -min Start minimized." << endl;
@ -437,6 +445,8 @@ void showErrMsg(const QString& msg,QWidget* parent){
QMessageBox::critical(parent,QApplication::translate("Main","Error"),msg,QApplication::translate("Main","OK")); QMessageBox::critical(parent,QApplication::translate("Main","Error"),msg,QApplication::translate("Main","OK"));
} }
//TODO Plugins
/*
QString findPlugin(const QString& filename){ QString findPlugin(const QString& filename){
QFileInfo info; QFileInfo info;
@ -446,7 +456,7 @@ QString findPlugin(const QString& filename){
return QString(); return QString();
} }
*/
QString makePathRelative(const QString& AbsDir,const QString& CurDir){ QString makePathRelative(const QString& AbsDir,const QString& CurDir){
QStringList abs=AbsDir.split('/'); QStringList abs=AbsDir.split('/');

@ -54,12 +54,13 @@ QString applicationDirPath();
const QIcon& getIcon(const QString& name); const QIcon& getIcon(const QString& name);
const QPixmap* getPixmap(const QString& name); const QPixmap* getPixmap(const QString& name);
QString decodeFileError(QFile::FileError Code); QString decodeFileError(QFile::FileError Code);
QString findPlugin(const QString& filename); //QString findPlugin(const QString& filename); //TODO Plugins
QString makePathRelative(const QString& Abs,const QString& Cur); QString makePathRelative(const QString& Abs,const QString& Cur);
extern QString PluginLoadError; extern QString PluginLoadError;
extern KpxConfig *config; extern KpxConfig *config;
extern QString AppDir; extern QString AppDir;
extern QString HomeDir;
extern bool TrActive; extern bool TrActive;
extern QString DetailViewTemplate; extern QString DetailViewTemplate;
extern QPixmap *EntryIcons; extern QPixmap *EntryIcons;

@ -78,7 +78,7 @@ KeepassMainWindow::KeepassMainWindow(const QString& ArgFile,bool ArgMin,bool Arg
InUnLock=false; InUnLock=false;
unlockDlg=NULL; unlockDlg=NULL;
setupUi(this); setupUi(this);
#ifdef QT_WS_MAC #ifdef Q_WS_MAC
setUnifiedTitleAndToolBarOnMac(true); setUnifiedTitleAndToolBarOnMac(true);
#endif #endif
#ifdef AUTOTYPE #ifdef AUTOTYPE
@ -218,6 +218,7 @@ void KeepassMainWindow::setupConnections(){
void KeepassMainWindow::setupToolbar(){ void KeepassMainWindow::setupToolbar(){
toolBar=new QToolBar(this); toolBar=new QToolBar(this);
toolBar->setMovable(false);
addToolBar(toolBar); addToolBar(toolBar);
toolBar->setIconSize(QSize(config->toolbarIconSize(),config->toolbarIconSize())); toolBar->setIconSize(QSize(config->toolbarIconSize(),config->toolbarIconSize()));
ViewShowToolbarAction=toolBar->toggleViewAction(); ViewShowToolbarAction=toolBar->toggleViewAction();
@ -269,6 +270,8 @@ void KeepassMainWindow::setupIcons(){
ExtrasSettingsAction->setIcon(getIcon("appsettings")); ExtrasSettingsAction->setIcon(getIcon("appsettings"));
#ifdef AUTOTYPE #ifdef AUTOTYPE
EditAutoTypeAction->setIcon(getIcon("autotype")); EditAutoTypeAction->setIcon(getIcon("autotype"));
#else
EditAutoTypeAction->setVisible(false);
#endif #endif
//HelpHandbookAction->setIcon(getIcon("manual")); //TODO Handbook //HelpHandbookAction->setIcon(getIcon("manual")); //TODO Handbook
HelpAboutAction->setIcon(getIcon("help")); HelpAboutAction->setIcon(getIcon("help"));
@ -982,7 +985,11 @@ void KeepassMainWindow::hideEvent(QHideEvent* event){
if (config->lockOnMinimize() && !IsLocked && FileOpen) if (config->lockOnMinimize() && !IsLocked && FileOpen)
OnUnLockWorkspace(); OnUnLockWorkspace();
if (config->showSysTrayIcon() && config->minimizeTray()){ if (config->showSysTrayIcon() && config->minimizeTray()){
setVisible(false); #ifdef Q_WS_WIN
QTimer::singleShot(100, this, SLOT(hide()));
#else
hide();
#endif
event->accept(); event->accept();
return; return;
} }
@ -1091,13 +1098,22 @@ void KeepassMainWindow::OnSysTrayActivated(QSystemTrayIcon::ActivationReason rea
hide(); hide();
} }
else{ else{
showNormal(); #ifdef Q_WS_WIN
if (IsLocked) QTimer::singleShot(100, this, SLOT(restoreWindow()));
OnUnLockWorkspace(); #else
restoreWindow();
#endif
} }
} }
} }
void KeepassMainWindow::restoreWindow(){
showNormal();
activateWindow();
if (IsLocked)
OnUnLockWorkspace();
}
void KeepassMainWindow::OnExtrasPasswordGen(){ void KeepassMainWindow::OnExtrasPasswordGen(){
CGenPwDialog dlg(this,true); CGenPwDialog dlg(this,true);
dlg.exec(); dlg.exec();

@ -92,6 +92,7 @@ class KeepassMainWindow : public QMainWindow, public Ui_MainWindow{
void OnShowSearchResults(); void OnShowSearchResults();
void OnEntryChanged(SelectionState); void OnEntryChanged(SelectionState);
void OnSysTrayActivated(QSystemTrayIcon::ActivationReason); void OnSysTrayActivated(QSystemTrayIcon::ActivationReason);
void restoreWindow();
void OnImport(QAction*); void OnImport(QAction*);
void OnExport(QAction*); void OnExport(QAction*);
void OnDetailViewUrlClicked(const QUrl& url); void OnDetailViewUrlClicked(const QUrl& url);

@ -1,63 +1,70 @@
######################################################################
# Automatically generated by qmake (2.01a) Mo Jan 29 18:17:19 2007
######################################################################
DEPENDPATH += "crypto \ DEPENDPATH += crypto \
dialogs \ dialogs \
export \ export \
forms \ forms \
import \ import \
lib \ lib \
translations \ translations \
res" res
win32:QMAKE_WIN32 = 1
MOC_DIR = ../build/moc
UI_DIR = ../build/ui
OBJECTS_DIR = ../build
RCC_DIR = ../build/rcc
INSTALLS += target data INSTALLS += target data
data.files += ../share/keepass/* data.files += ../share/keepass/*
TARGET = ../bin/keepassx TARGET = ../bin/keepassx
isEmpty(PREFIX){ unix : !macx : !isEqual(QMAKE_WIN32,1) {
PREFIX = /usr isEmpty(PREFIX):PREFIX = /usr
}
unix : !macx { !isEqual(AUTOTYPE,0) {
!isEqual(AUTOTYPE,0){ DEFINES += AUTOTYPE
DEFINES += AUTOTYPE !isEqual(GLOBAL_AUTOTYPE,0) {
!isEqual(GLOBAL_AUTOTYPE,0){
DEFINES += GLOBAL_AUTOTYPE DEFINES += GLOBAL_AUTOTYPE
}
}
target.path = $${PREFIX}/bin
data.path = $${PREFIX}/share/keepass
pixmaps.files = ../share/pixmaps/*
pixmaps.path = $${PREFIX}/share/pixmaps
desktop.files = ../share/applications/*
desktop.path = $${PREFIX}/share/applications
INSTALLS += pixmaps desktop
contains(DEFINES,AUTOTYPE){
LIBS += -lXtst
SOURCES += lib/HelperX11.cpp lib/AutoType_X11.cpp
HEADERS += lib/HelperX11.h
}
contains(DEFINES,GLOBAL_AUTOTYPE){
SOURCES += Application_X11.cpp
HEADERS += Application_X11.h
} }
} }
target.path = $${PREFIX}/bin
contains(DEFINES,GLOBAL_AUTOTYPE){ data.path = $${PREFIX}/share/keepass
FORMS += forms/AutoTypeDlg.ui pixmaps.files = ../share/pixmaps/*
HEADERS += dialogs/AutoTypeDlg.h pixmaps.path = $${PREFIX}/share/pixmaps
SOURCES += dialogs/AutoTypeDlg.cpp desktop.files = ../share/applications/*
desktop.path = $${PREFIX}/share/applications
INSTALLS += pixmaps desktop
contains(DEFINES,AUTOTYPE) {
LIBS += -lXtst
SOURCES += lib/HelperX11.cpp lib/AutoType_X11.cpp
HEADERS += lib/HelperX11.h
}
contains(DEFINES,GLOBAL_AUTOTYPE) {
SOURCES += Application_X11.cpp
HEADERS += Application_X11.h
}
} }
macx { macx {
target.path = /Applications isEmpty(PREFIX):PREFIX = /Applications
data.path = /Applications/keepass.app/Contents/share/keepass target.path = $${PREFIX}
data.path = $${PREFIX}/keepassx.app/Contents/share/keepass
} }
win32 { isEqual(QMAKE_WIN32,1) {
TARGET = ../$$TARGET isEmpty(PREFIX):PREFIX = "C:/Program files/KeePassX"
QMAKE_LINK_OBJECT_SCRIPT = ../build/$$QMAKE_LINK_OBJECT_SCRIPT
target.path = $${PREFIX}
data.path = $${PREFIX}/share
RC_FILE = ../share/ico/keepassx.rc
QMAKE_LINK_OBJECT_SCRIPT = $${OBJECTS_DIR}/$${QMAKE_LINK_OBJECT_SCRIPT}
}
contains(DEFINES,GLOBAL_AUTOTYPE) {
FORMS += forms/AutoTypeDlg.ui
HEADERS += dialogs/AutoTypeDlg.h
SOURCES += dialogs/AutoTypeDlg.cpp
} }
FORMS += forms/EditGroupDlg.ui \ FORMS += forms/EditGroupDlg.ui \
@ -70,34 +77,35 @@ FORMS += forms/EditGroupDlg.ui \
forms/PasswordDlg.ui \ forms/PasswordDlg.ui \
forms/EditEntryDlg.ui \ forms/EditEntryDlg.ui \
forms/PasswordGenDlg.ui \ forms/PasswordGenDlg.ui \
forms/SelectIconDlg.ui \ forms/SelectIconDlg.ui \
forms/CollectEntropyDlg.ui \ forms/CollectEntropyDlg.ui \
forms/CustomizeDetailViewDlg.ui \ forms/CustomizeDetailViewDlg.ui \
forms/CalendarDlg.ui \ forms/CalendarDlg.ui \
# forms/TrashCanDlg.ui \ # forms/TrashCanDlg.ui \
forms/ExpiredEntriesDlg.ui \ forms/ExpiredEntriesDlg.ui \
forms/WorkspaceLockedWidget.ui \ forms/WorkspaceLockedWidget.ui \
forms/AddBookmarkDlg.ui \ forms/AddBookmarkDlg.ui \
forms/ManageBookmarksDlg.ui forms/ManageBookmarksDlg.ui
TRANSLATIONS += translations/keepass-de_DE.ts \ TRANSLATIONS += translations/keepass-de_DE.ts \
translations/keepass-ru_RU.ts \ translations/keepass-ru_RU.ts \
translations/keepass-es_ES.ts \ translations/keepass-es_ES.ts \
translations/keepass-fr_FR.ts \ translations/keepass-fr_FR.ts \
translations/keepass-cs_CS.ts \ translations/keepass-cs_CS.ts \
translations/keepass-xx_XX.ts translations/keepass-xx_XX.ts
HEADERS += lib/IniReader.h \
lib/UrlLabel.h \ HEADERS += lib/UrlLabel.h \
mainwindow.h \ mainwindow.h \
Kdb3Database.h \ Kdb3Database.h \
lib/SecString.h \ lib/SecString.h \
crypto/twoclass.h \ crypto/twoclass.h \
crypto/twofish.h \ crypto/twofish.h \
import/Import.h \ import/Import.h \
import/Import_KeePassX_Xml.h \ import/Import_KeePassX_Xml.h \
import/Import_PwManager.h \ import/Import_PwManager.h \
export/Export_Txt.h \ export/Export_Txt.h \
export/Export_KeePassX_Xml.h \ export/Export_KeePassX_Xml.h \
export/Export.h \ export/Export.h \
import/Import_KWalletXml.h \ import/Import_KWalletXml.h \
dialogs/AboutDlg.h \ dialogs/AboutDlg.h \
dialogs/EditGroupDlg.h \ dialogs/EditGroupDlg.h \
@ -108,44 +116,44 @@ HEADERS += lib/IniReader.h \
dialogs/SimplePasswordDlg.h \ dialogs/SimplePasswordDlg.h \
dialogs/EditEntryDlg.h \ dialogs/EditEntryDlg.h \
dialogs/PasswordGenDlg.h \ dialogs/PasswordGenDlg.h \
dialogs/SelectIconDlg.h \ dialogs/SelectIconDlg.h \
dialogs/CollectEntropyDlg.h \ dialogs/CollectEntropyDlg.h \
dialogs/CustomizeDetailViewDlg.h \ dialogs/CustomizeDetailViewDlg.h \
dialogs/CalendarDlg.h \ dialogs/CalendarDlg.h \
dialogs/ExpiredEntriesDlg.h \ dialogs/ExpiredEntriesDlg.h \
# dialogs/TrashCanDlg.h \ # dialogs/TrashCanDlg.h \
lib/random.h \ lib/random.h \
Database.h \ Database.h \
# lib/KdePlugin.h \ # lib/KdePlugin.h \
lib/AutoType.h \ lib/AutoType.h \
lib/FileDialogs.h \ lib/FileDialogs.h \
lib/ShortcutWidget.h \ lib/ShortcutWidget.h \
global.h \ global.h \
main.h \ main.h \
lib/GroupView.h \ lib/GroupView.h \
lib/EntryView.h \ lib/EntryView.h \
crypto/arcfour.h \ crypto/arcfour.h \
lib/KpFileIconProvider.h \ lib/KpFileIconProvider.h \
crypto/aes_edefs.h \ crypto/aes_edefs.h \
crypto/aes_tdefs.h \ crypto/aes_tdefs.h \
crypto/aes.h \ crypto/aes.h \
crypto/aesopt.h \ crypto/aesopt.h \
crypto/aestab.h \ crypto/aestab.h \
crypto/aescpp.h \ crypto/aescpp.h \
crypto/sha256.h \ crypto/sha256.h \
crypto/yarrow.h \ crypto/yarrow.h \
crypto/blowfish.h \ crypto/blowfish.h \
crypto/sha1.h \ crypto/sha1.h \
lib/WaitAnimationWidget.h \ lib/WaitAnimationWidget.h \
plugins/interfaces/IFileDialog.h \ plugins/interfaces/IFileDialog.h \
plugins/interfaces/IKdeInit.h \ # plugins/interfaces/IKdeInit.h \
plugins/interfaces/IGnomeInit.h \ # plugins/interfaces/IGnomeInit.h \
plugins/interfaces/IIconTheme.h \ plugins/interfaces/IIconTheme.h \
KpxConfig.h \ KpxConfig.h \
# KpxFirefox.h \ # KpxFirefox.h \
dialogs/AddBookmarkDlg.h \ dialogs/AddBookmarkDlg.h \
lib/bookmarks.h \ lib/bookmarks.h \
dialogs/ManageBookmarksDlg.h dialogs/ManageBookmarksDlg.h
SOURCES += lib/UrlLabel.cpp \ SOURCES += lib/UrlLabel.cpp \
main.cpp \ main.cpp \
mainwindow.cpp \ mainwindow.cpp \
@ -153,14 +161,14 @@ SOURCES += lib/UrlLabel.cpp \
lib/SecString.cpp \ lib/SecString.cpp \
crypto/twoclass.cpp \ crypto/twoclass.cpp \
crypto/twofish.cpp \ crypto/twofish.cpp \
crypto/blowfish.cpp \ crypto/blowfish.cpp \
crypto/sha1.cpp \ crypto/sha1.cpp \
import/Import.cpp \ import/Import.cpp \
import/Import_PwManager.cpp \ import/Import_PwManager.cpp \
import/Import_KeePassX_Xml.cpp \ import/Import_KeePassX_Xml.cpp \
export/Export_Txt.cpp \ export/Export_Txt.cpp \
export/Export_KeePassX_Xml.cpp \ export/Export_KeePassX_Xml.cpp \
export/Export.cpp \ export/Export.cpp \
import/Import_KWalletXml.cpp \ import/Import_KWalletXml.cpp \
dialogs/AboutDlg.cpp \ dialogs/AboutDlg.cpp \
dialogs/EditGroupDlg.cpp \ dialogs/EditGroupDlg.cpp \
@ -171,58 +179,59 @@ SOURCES += lib/UrlLabel.cpp \
dialogs/SimplePasswordDlg.cpp \ dialogs/SimplePasswordDlg.cpp \
dialogs/EditEntryDlg.cpp \ dialogs/EditEntryDlg.cpp \
dialogs/PasswordGenDlg.cpp \ dialogs/PasswordGenDlg.cpp \
dialogs/SelectIconDlg.cpp \ dialogs/SelectIconDlg.cpp \
dialogs/CollectEntropyDlg.cpp \ dialogs/CollectEntropyDlg.cpp \
dialogs/CustomizeDetailViewDlg.cpp \ dialogs/CustomizeDetailViewDlg.cpp \
dialogs/CalendarDlg.cpp \ dialogs/CalendarDlg.cpp \
dialogs/ExpiredEntriesDlg.cpp \ dialogs/ExpiredEntriesDlg.cpp \
# dialogs/TrashCanDlg.cpp \ # dialogs/TrashCanDlg.cpp \
lib/random.cpp \ lib/random.cpp \
Database.cpp \ Database.cpp \
# lib/KdePlugin.cpp \ # lib/KdePlugin.cpp \
lib/GroupView.cpp \ lib/GroupView.cpp \
lib/EntryView.cpp \ lib/EntryView.cpp \
lib/FileDialogs.cpp \ lib/FileDialogs.cpp \
crypto/arcfour.cpp \ crypto/arcfour.cpp \
lib/KpFileIconProvider.cpp \ lib/KpFileIconProvider.cpp \
lib/ShortcutWidget.cpp \ lib/ShortcutWidget.cpp \
crypto/aescrypt.c \ crypto/aescrypt.c \
crypto/aeskey.c \ crypto/aeskey.c \
crypto/aestab.c \ crypto/aestab.c \
crypto/aes_modes.c \ crypto/aes_modes.c \
crypto/sha256.cpp \ crypto/sha256.cpp \
crypto/yarrow.cpp \ crypto/yarrow.cpp \
lib/WaitAnimationWidget.cpp \ lib/WaitAnimationWidget.cpp \
KpxConfig.cpp \ KpxConfig.cpp \
# KpxFirefox.cpp \ # KpxFirefox.cpp \
dialogs/AddBookmarkDlg.cpp \ dialogs/AddBookmarkDlg.cpp \
lib/bookmarks.cpp \ lib/bookmarks.cpp \
dialogs/ManageBookmarksDlg.cpp dialogs/ManageBookmarksDlg.cpp
RESOURCES += res/resources.qrc RESOURCES += res/resources.qrc
MOC_DIR = ../build/moc
UI_DIR = ../build/ui
OBJECTS_DIR = ../build/
RCC_DIR = ../build/rcc
CONFIG = qt \ CONFIG = qt \
uic \ uic \
resources \ resources \
thread \ thread \
stl \ stl \
warn_off warn_off
QT += xml QT += xml
TEMPLATE = app TEMPLATE = app
INCLUDEPATH += . \ INCLUDEPATH += . \
lib \ lib \
crypto \ crypto \
plugins/interfaces \ plugins/interfaces \
export \ export \
import \ import \
dialogs \ dialogs \
./ ./
isEqual(RELEASE,1){ isEqual(RELEASE,1) {
CONFIG += release CONFIG += release
} }
else{ else {
CONFIG += debug CONFIG += debug
} }
isEqual(QMAKE_WIN32,1) {
CONFIG += windows
}