Fixed: binary not installed

Removed unused variables and fixed some other compiler warnings

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@163 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 17 years ago
parent 93667814dc
commit 3a5259eb47
  1. 9
      src/Kdb3Database.cpp
  2. 1
      src/crypto/arcfour.cpp
  3. 2
      src/crypto/blowfish.cpp
  4. 2
      src/dialogs/AddBookmarkDlg.cpp
  5. 7
      src/lib/EntryView.cpp
  6. 2
      src/lib/WaitAnimationWidget.cpp
  7. 2
      src/lib/bookmarks.cpp
  8. 2
      src/lib/bookmarks.h
  9. 4
      src/main.cpp
  10. 1
      src/mainwindow.cpp
  11. 8
      src/src.pro

@ -367,9 +367,9 @@ bool Kdb3Database::createGroupTree(QList<quint32>& Levels){
Groups[i].Index=RootGroup.Childs.size(); Groups[i].Index=RootGroup.Childs.size();
RootGroup.Childs.append(&Groups[i]); RootGroup.Childs.append(&Groups[i]);
continue;} continue;}
int j=i-1; int j;
//the first item with a lower level is the parent //the first item with a lower level is the parent
for(j;j>=0;j--){ for(j=i-1;j>=0;j--){
if(Levels[j]<Levels[i]){ if(Levels[j]<Levels[i]){
if(Levels[i]-Levels[j]!=1)return false; if(Levels[i]-Levels[j]!=1)return false;
break; break;
@ -507,7 +507,6 @@ if(memcmp(ContentsHash, FinalKey, 32) != 0){
KeyError=true; KeyError=true;
return false;} return false;}
unsigned long tmp_id=0;
unsigned long pos = DB_HEADER_SIZE; unsigned long pos = DB_HEADER_SIZE;
quint16 FieldType; quint16 FieldType;
quint32 FieldSize; quint32 FieldSize;
@ -584,7 +583,6 @@ if(!createGroupTree(Levels)){
return false; return false;
} }
unsigned long CurGID, g, e, z, num;
delete [] buffer; delete [] buffer;
//Remove the metastreams from the entry list //Remove the metastreams from the entry list
@ -760,8 +758,6 @@ void Kdb3Database::authByPwd(QString& Password){
QByteArray lat,utf; QByteArray lat,utf;
utf=Password.toUtf8(); utf=Password.toUtf8();
lat=Password.toLatin1(); lat=Password.toLatin1();
char *Lat=lat.data();
char *Utf=utf.data();
return; return;
} }
@ -850,7 +846,6 @@ QList<IEntryHandle*> Kdb3Database::entries(IGroupHandle* group){
void Kdb3Database::deleteEntry(IEntryHandle* entry){ void Kdb3Database::deleteEntry(IEntryHandle* entry){
if(!entry)return; if(!entry)return;
StdGroup* Group=((EntryHandle*)entry)->Entry->Group;
int j; int j;
for(j=0;j<Entries.size();j++){ for(j=0;j<Entries.size();j++){
if(&Entries[j]==((EntryHandle*)entry)->Entry) if(&Entries[j]==((EntryHandle*)entry)->Entry)

@ -36,7 +36,6 @@ RawKey=QByteArray((const char*)key_data_ptr,key_data_len);
} }
void CArcFour::prepareKey(){ void CArcFour::prepareKey(){
unsigned char swapByte;
unsigned char index1; unsigned char index1;
unsigned char index2; unsigned char index2;
unsigned char* state; unsigned char* state;

@ -227,7 +227,7 @@ static const uint32_t ps[BLOWFISH_ROUNDS + 2] = {
}; };
Blowfish::Blowfish() Blowfish::Blowfish()
{ static bool mustSelfTest = false; {
} }
void Blowfish::burn_stack(int bytes) void Blowfish::burn_stack(int bytes)

@ -69,4 +69,4 @@ void AddBookmarkDlg::OnButtonOk(){
else else
KpxBookmarks::edit(Edit_Title->text(),Edit_Filename->text(),ItemID); KpxBookmarks::edit(Edit_Title->text(),Edit_Filename->text(),ItemID);
accept(); accept();
} }

@ -97,12 +97,11 @@ void KeepassEntryView::OnItemsChanged(){
} }
bool sortSearchResultsLessThan(const IEntryHandle* a, const IEntryHandle* b){ bool sortSearchResultsLessThan(const IEntryHandle* a, const IEntryHandle* b){
int indexA=0; int indexA, indexB;
int indexB=0; for(indexA=0;indexA<pItems->size();indexA++){
for(indexA;indexA<pItems->size();indexA++){
if((*pItems)[indexA]->EntryHandle==a)break; if((*pItems)[indexA]->EntryHandle==a)break;
} }
for(indexB;indexB<pItems->size();indexB++){ for(indexB=0;indexB<pItems->size();indexB++){
if((*pItems)[indexB]->EntryHandle==b)break; if((*pItems)[indexB]->EntryHandle==b)break;
} }
return pEntryView->indexOfTopLevelItem((*pItems)[indexA])<pEntryView->indexOfTopLevelItem((*pItems)[indexB]); return pEntryView->indexOfTopLevelItem((*pItems)[indexA])<pEntryView->indexOfTopLevelItem((*pItems)[indexB]);

@ -55,7 +55,7 @@ void WaitAnimationWidget::stop(){
void WaitAnimationWidget::setRefreshRate(int fps){ void WaitAnimationWidget::setRefreshRate(int fps){
DiffAngle=1.0f/((60.0f/(float)speed)*(float)fps); DiffAngle=1.0f/((60.0f/(float)speed)*(float)fps);
timer.setInterval((1.0f/(float)fps)*1000.0f); timer.setInterval((int) ((1.0f/(float)fps)*1000.0f));
} }
void WaitAnimationWidget::refreshAnimation(){ void WaitAnimationWidget::refreshAnimation(){

@ -60,7 +60,7 @@ int KpxBookmarks::add(const QString& Title,const QString& Path){
return Bookmarks.size()-1; return Bookmarks.size()-1;
} }
bool KpxBookmarks::save(){ void KpxBookmarks::save(){
for (int i=0;i<count();i++){ for (int i=0;i<count();i++){
config->settings.setValue( QString("Bookmarks/%1/Title").arg(i+1), Bookmarks[i].Title ); config->settings.setValue( QString("Bookmarks/%1/Title").arg(i+1), Bookmarks[i].Title );
config->settings.setValue( QString("Bookmarks/%1/Path").arg(i+1), Bookmarks[i].Path ); config->settings.setValue( QString("Bookmarks/%1/Path").arg(i+1), Bookmarks[i].Path );

@ -33,7 +33,7 @@ class KpxBookmarks {
static QString title(int Index); static QString title(int Index);
static QString path(int Index); static QString path(int Index);
private: private:
static bool save(); static void save();
class BookmarkEntry { class BookmarkEntry {
public: public:
QString Title; QString Title;

@ -473,8 +473,8 @@ QString makePathRelative(const QString& AbsDir,const QString& CurDir){
QStringList abs=AbsDir.split('/'); QStringList abs=AbsDir.split('/');
QStringList cur=CurDir.split('/'); QStringList cur=CurDir.split('/');
QString rel="./"; QString rel="./";
int common=0; int common;
for(common; common < abs.size() && common < cur.size(); common++){ for(common=0; common < abs.size() && common < cur.size(); common++){
if(abs[common]!=cur[common])break; if(abs[common]!=cur[common])break;
} }
for(int i=0;i<cur.size()-common;i++) for(int i=0;i<cur.size()-common;i++)

@ -1099,7 +1099,6 @@ void KeepassMainWindow::OnViewToolbarIconSize28(bool state){
void KeepassMainWindow::OnSysTrayActivated(QSystemTrayIcon::ActivationReason reason){ void KeepassMainWindow::OnSysTrayActivated(QSystemTrayIcon::ActivationReason reason){
if(reason!=QSystemTrayIcon::Context){ if(reason!=QSystemTrayIcon::Context){
bool unlockActive = (unlockDlg!=NULL && unlockDlg->isActiveWindow());
if (isVisible()){ if (isVisible()){
if (unlockDlg!=NULL) if (unlockDlg!=NULL)
unlockDlg->reject(); unlockDlg->reject();

@ -31,7 +31,7 @@ unix : !macx : !isEqual(QMAKE_WIN32,1) {
} }
} }
TARGET = ../bin/keepassx TARGET = ../bin/keepassx
TARGET.path = $${PREFIX}/bin target.path = $${PREFIX}/bin
data.path = $${PREFIX}/share data.path = $${PREFIX}/share
pixmaps.files = ../share/pixmaps/* pixmaps.files = ../share/pixmaps/*
pixmaps.path = $${PREFIX}/share/pixmaps pixmaps.path = $${PREFIX}/share/pixmaps
@ -59,7 +59,7 @@ unix : !macx : !isEqual(QMAKE_WIN32,1) {
macx { macx {
isEmpty(PREFIX):PREFIX = /Applications isEmpty(PREFIX):PREFIX = /Applications
TARGET = ../bin/KeePassX TARGET = ../bin/KeePassX
TARGET.path = $${PREFIX} target.path = $${PREFIX}
data.path = Contents/Resources data.path = Contents/Resources
isEmpty(QT_FRAMEWORK_DIR) : QT_FRAMEWORK_DIR = /Library/Frameworks isEmpty(QT_FRAMEWORK_DIR) : QT_FRAMEWORK_DIR = /Library/Frameworks
private_frameworks.files += $${QT_FRAMEWORK_DIR}/QtCore.framework private_frameworks.files += $${QT_FRAMEWORK_DIR}/QtCore.framework
@ -82,7 +82,7 @@ isEqual(QMAKE_WIN32,1) {
CONFIG += windows CONFIG += windows
isEmpty(PREFIX):PREFIX = "C:/Program files/KeePassX" isEmpty(PREFIX):PREFIX = "C:/Program files/KeePassX"
TARGET = ../bin/KeePassX TARGET = ../bin/KeePassX
TARGET.path = $${PREFIX} target.path = $${PREFIX}
data.path = $${PREFIX}/share data.path = $${PREFIX}/share
RC_FILE = ../share/ico/keepassx.rc RC_FILE = ../share/ico/keepassx.rc
QMAKE_LINK_OBJECT_SCRIPT = $${OBJECTS_DIR}/$${QMAKE_LINK_OBJECT_SCRIPT} QMAKE_LINK_OBJECT_SCRIPT = $${OBJECTS_DIR}/$${QMAKE_LINK_OBJECT_SCRIPT}
@ -90,7 +90,7 @@ isEqual(QMAKE_WIN32,1) {
data.files += ../share/keepassx data.files += ../share/keepassx
INSTALLS += TARGET data INSTALLS += target data
contains(DEFINES,GLOBAL_AUTOTYPE) { contains(DEFINES,GLOBAL_AUTOTYPE) {
FORMS += forms/AutoTypeDlg.ui FORMS += forms/AutoTypeDlg.ui