- support for precompiled headers
- made password dialog more userfriendly (especially key file creation/selection) - database file as command line argument is recognized again - fixed bug #1825446 (commandline option -cfg does NOT take relative path) - fixed mac buid problem (see item #1908868) git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@174 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -21,9 +21,6 @@
|
||||
#ifndef _AUTOTYPE_H_
|
||||
#define _AUTOTYPE_H_
|
||||
|
||||
#include <QString>
|
||||
#include "Database.h"
|
||||
|
||||
#ifdef GLOBAL_AUTOTYPE
|
||||
struct Shortcut{
|
||||
bool ctrl, shift, alt, altgr, win;
|
||||
|
||||
@@ -18,18 +18,14 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QtCore>
|
||||
#include "KpxConfig.h"
|
||||
#include "AutoType.h"
|
||||
#include "mainwindow.h"
|
||||
#include <QList>
|
||||
#include <QChar>
|
||||
#include <QX11Info>
|
||||
#include "HelperX11.h"
|
||||
#include <X11/Xutil.h>
|
||||
#include "mainwindow.h"
|
||||
#include "HelperX11.h"
|
||||
#include "AutoType.h"
|
||||
|
||||
#ifdef GLOBAL_AUTOTYPE
|
||||
#include "dialogs/AutoTypeDlg.h"
|
||||
#include "dialogs/AutoTypeDlg.h"
|
||||
#endif
|
||||
|
||||
enum AutoTypeActionType{
|
||||
|
||||
@@ -18,24 +18,12 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDragMoveEvent>
|
||||
#include <QDragLeaveEvent>
|
||||
#include <QDropEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QHeaderView>
|
||||
#include <QTime>
|
||||
#include <QApplication>
|
||||
#include <QPainter>
|
||||
#include <QPair>
|
||||
#include <QMessageBox>
|
||||
#include "main.h"
|
||||
#include "KpxConfig.h"
|
||||
#include "EntryView.h"
|
||||
#include "dialogs/EditEntryDlg.h"
|
||||
#include <QClipboard>
|
||||
#include <QFileDialog>
|
||||
#include "lib/AutoType.h"
|
||||
#include "Database.h"
|
||||
#include "lib/EntryView.h"
|
||||
#include "dialogs/EditEntryDlg.h"
|
||||
|
||||
// just for the lessThan funtion
|
||||
QList<EntryViewItem*>* pItems;
|
||||
|
||||
@@ -21,15 +21,7 @@
|
||||
#ifndef _ENTRY_VIEW_H_
|
||||
#define _ENTRY_VIEW_H_
|
||||
|
||||
#include <QMenu>
|
||||
#include <QTreeWidget>
|
||||
#include <QContextMenuEvent>
|
||||
#include <QHeaderView>
|
||||
#include <QTimer>
|
||||
#include <QClipboard>
|
||||
#include <QBitArray>
|
||||
#include <QList>
|
||||
#include "../Kdb3Database.h"
|
||||
#include "Kdb3Database.h"
|
||||
|
||||
#define NUM_COLUMNS 11
|
||||
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QDir>
|
||||
#include "main.h"
|
||||
#include "KpxConfig.h"
|
||||
#include "FileDialogs.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
|
||||
IFileDialog* KpxFileDialogs::iFileDialog=NULL;
|
||||
QtStandardFileDialogs DefaultQtDlgs;
|
||||
|
||||
@@ -19,11 +19,7 @@
|
||||
***************************************************************************/
|
||||
#ifndef _FILE_DIALOGS_H_
|
||||
#define _FILE_DIALOGS_H_
|
||||
|
||||
#include <QObject>
|
||||
#include <QFileDialog>
|
||||
#include <QList>
|
||||
#include <QHash>
|
||||
|
||||
#include "plugins/interfaces/IFileDialog.h"
|
||||
|
||||
|
||||
|
||||
@@ -17,24 +17,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QDragEnterEvent>
|
||||
#include <QDragMoveEvent>
|
||||
#include <QDragLeaveEvent>
|
||||
#include <QDropEvent>
|
||||
#include <QPaintEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QApplication>
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QSize>
|
||||
#include <QPixmap>
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QBrush>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include "KpxConfig.h"
|
||||
#include "main.h"
|
||||
|
||||
#include "EntryView.h"
|
||||
#include "GroupView.h"
|
||||
#include "dialogs/EditGroupDlg.h"
|
||||
|
||||
@@ -20,10 +20,7 @@
|
||||
#ifndef _GROUP_VIEW_H_
|
||||
#define _GROUP_VIEW_H_
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QLine>
|
||||
#include <QContextMenuEvent>
|
||||
#include "../Kdb3Database.h"
|
||||
#include "Kdb3Database.h"
|
||||
|
||||
class GroupViewItem;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "HelperX11.h"
|
||||
|
||||
#include <QX11Info>
|
||||
|
||||
int HelperX11::getModifiers(Display *d,KeySym keysym, int keycode){
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "SecString.h"
|
||||
#include <iostream>
|
||||
#include "crypto/arcfour.h"
|
||||
#include "crypto/yarrow.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
CArcFour SecString::RC4;
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
#ifndef _SECSTRING_H_
|
||||
#define _SECSTRING_H_
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
#include <QGlobalStatic>
|
||||
#include "crypto/arcfour.h"
|
||||
|
||||
//! QString based class with in-memory encryption of its content.
|
||||
/*!
|
||||
This class can hold a QString object in an encrypted buffer. To get access to the string it is neccassary to unlock the SecString object.
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#ifndef SHORTCUT_WIDGET_H
|
||||
#define SHORTCUT_WIDGET_H
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
#if defined(GLOBAL_AUTOTYPE) && defined(Q_WS_X11)
|
||||
#include "lib/AutoType.h"
|
||||
|
||||
@@ -20,15 +20,6 @@
|
||||
|
||||
|
||||
#include "UrlLabel.h"
|
||||
#include "main.h"
|
||||
#include "lib/tools.h"
|
||||
#include <QFont>
|
||||
#include <QColor>
|
||||
#include <QCursor>
|
||||
#include <QFontMetrics>
|
||||
#include <QMouseEvent>
|
||||
#include <QLabel>
|
||||
#include <QPalette>
|
||||
|
||||
LinkLabel::LinkLabel(QWidget *parent,const QString& text, int x, int y,Qt::WFlags f) : QLabel(parent,f){
|
||||
QFont font(parentWidget()->font()); font.setUnderline(true);
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
|
||||
#ifndef _LINKLABEL_H_
|
||||
#define _LINKLABEL_H_
|
||||
#include <QLabel>
|
||||
#include <QMouseEvent>
|
||||
|
||||
class LinkLabel : public QLabel{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <QPainter>
|
||||
#include <QRectF>
|
||||
#include "main.h"
|
||||
|
||||
#include "WaitAnimationWidget.h"
|
||||
|
||||
|
||||
|
||||
@@ -17,12 +17,7 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPaintEvent>
|
||||
#include <QResizeEvent>
|
||||
#include <QTimer>
|
||||
#include <QPointF>
|
||||
|
||||
|
||||
class WaitAnimationWidget:public QWidget{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "bookmarks.h"
|
||||
#include "main.h"
|
||||
#include "KpxConfig.h"
|
||||
|
||||
|
||||
QList<KpxBookmarks::BookmarkEntry> KpxBookmarks::Bookmarks;
|
||||
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
#ifndef _BOOKMARKS_H_
|
||||
#define _BOOKMARKS_H_
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
class KpxBookmarks {
|
||||
public:
|
||||
static void load();
|
||||
|
||||
@@ -17,4 +17,10 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#ifndef RANDOM_H_
|
||||
#define RANDOM_H_
|
||||
|
||||
extern void getRandomBytes(void* buffer,int NumBlocks,int BlockSize=1,bool Strong=false);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -16,12 +16,9 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
#include "KpxConfig.h"
|
||||
#include "main.h"
|
||||
#include "lib/tools.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDesktopServices>
|
||||
|
||||
void createBanner(QPixmap* Pixmap,const QPixmap* IconAlpha,const QString& Text,int Width){
|
||||
createBanner(Pixmap,IconAlpha,Text,Width,config->bannerColor1(),config->bannerColor2(),config->bannerTextColor());
|
||||
@@ -177,3 +174,37 @@ const QPixmap* getPixmap(const QString& name){
|
||||
}
|
||||
|
||||
|
||||
bool createKeyFile(const QString& filename,QString* error,int length, bool Hex){
|
||||
QFile file(filename);
|
||||
if(!file.open(QIODevice::WriteOnly|QIODevice::Truncate|QIODevice::Unbuffered)){
|
||||
*error=decodeFileError(file.error());
|
||||
return false;
|
||||
}
|
||||
if(Hex)length*=2;
|
||||
unsigned char* key=new unsigned char[length];
|
||||
randomize(key,length);
|
||||
if(Hex){
|
||||
// convert binary data to hex code (8 bit ==> 2 digits)
|
||||
for(int i=0; i<length; i+=2){
|
||||
unsigned char dig1,dig2;
|
||||
dig1=key[i]/16;
|
||||
key[i]-=(16*dig1);
|
||||
dig2=key[i];
|
||||
if(dig1>9)key[i]='A'+dig1-10;
|
||||
else key[i]='0'+dig1;
|
||||
if(dig2>9)key[i+1]='A'+dig2-10;
|
||||
else key[i+1]='0'+dig2;
|
||||
}
|
||||
}
|
||||
if(file.write((char*)key,length)==-1){
|
||||
delete [] key;
|
||||
*error=decodeFileError(file.error());
|
||||
file.close();
|
||||
return false;
|
||||
}
|
||||
file.close();
|
||||
delete [] key;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,11 +19,6 @@
|
||||
#ifndef TOOLS_H
|
||||
#define TOOLS_H
|
||||
|
||||
#include <QFile>
|
||||
#include <QString>
|
||||
#include <QPixmap>
|
||||
#include <QIcon>
|
||||
|
||||
#define CSTR(x)(x.toLocal8Bit().constData())
|
||||
class IEntryHandle;
|
||||
typedef enum tKeyType {PASSWORD=0,KEYFILE=1,BOTH=2};
|
||||
@@ -37,5 +32,6 @@ void showErrMsg(const QString& msg,QWidget* parent=NULL);
|
||||
QString decodeFileError(QFile::FileError Code);
|
||||
QString makePathRelative(const QString& Abs,const QString& Cur);
|
||||
QString getImageFile(const QString& name);
|
||||
bool createKeyFile(const QString& filename,QString* err, int length=32, bool Hex=true);
|
||||
|
||||
#endif //TOOLS_H
|
||||
|
||||
Reference in New Issue
Block a user