aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-27 13:41:14 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-27 13:41:14 +0000
commit9cdc9942ef0f6d5f47b5ecb4551a2dcebefc4073 (patch)
treef7d69a78c827261d6298d19daa685072b7ab14ba
parentumlaute are handled correctly while signing (diff)
downloadgpg4usb-9cdc9942ef0f6d5f47b5ecb4551a2dcebefc4073.tar.gz
gpg4usb-9cdc9942ef0f6d5f47b5ecb4551a2dcebefc4073.zip
changed includes to class declarations where possible and moved includes and class declarations to header files
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@522 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--TODO2
-rw-r--r--attachments.h25
-rw-r--r--attachmenttablemodel.h5
-rw-r--r--editorpage.cpp2
-rw-r--r--editorpage.h2
-rwxr-xr-xfileencryptiondialog.cpp10
-rwxr-xr-xfileencryptiondialog.h16
-rw-r--r--gpgwin.cpp3
-rw-r--r--gpgwin.h3
-rw-r--r--keydetailsdialog.cpp1
-rw-r--r--keydetailsdialog.h7
-rw-r--r--keygenthread.cpp2
-rw-r--r--keygenthread.h3
-rw-r--r--keylist.cpp1
-rwxr-xr-xkeymgmt.cpp3
-rwxr-xr-xkeymgmt.h12
-rw-r--r--keyserverimportdialog.cpp3
-rw-r--r--keyserverimportdialog.h12
-rw-r--r--mime.cpp3
-rw-r--r--mime.h6
-rwxr-xr-xquitdialog.cpp2
-rwxr-xr-xquitdialog.h2
-rwxr-xr-xsettingsdialog.cpp15
-rwxr-xr-xsettingsdialog.h37
-rw-r--r--textedit.cpp4
-rw-r--r--textedit.h19
-rw-r--r--verifynotification.h13
27 files changed, 96 insertions, 117 deletions
diff --git a/TODO b/TODO
index 157943d..cfb71b3 100644
--- a/TODO
+++ b/TODO
@@ -7,7 +7,6 @@ Release 0.3.1
- key should blink short in keylist after import
- show keys which verified message in different colour
- css
-- save the last used directory in open file dialog
- set gpgme error language to chosen language (context.cpp:49)
- in verifycation dialog import multiple keys
- inform user about verification errors
@@ -29,6 +28,7 @@ Release 0.3.2
- clear cache nach Programmende (siehe kbasket)
- check pointer usage (const/references)
- add posibility to change password of key
+- save the last used directory in open file dialog
- make keylist browsable with keyboard
- update gpgme-library
- Change Keytable sorting: private keys should always be on top (partially solving "encrypt to self")
diff --git a/attachments.h b/attachments.h
index 6fe1bae..79bebdb 100644
--- a/attachments.h
+++ b/attachments.h
@@ -24,19 +24,20 @@
#include "mime.h"
#include "attachmenttablemodel.h"
+#include <QtGui>
+#include <QWidget>
-#include "QWidget"
-#include "QTableView"
-#include "QHeaderView"
-#include "QVBoxLayout"
-#include "QMenu"
-#include "QMessageBox"
-#include "QContextMenuEvent"
-#include "QFileDialog"
-#include "QUrl"
-#include "QDesktopServices"
-#include "QSettings"
-#include "QApplication"
+class QTableView;
+class QHeaderView;
+class QVBoxLayout;
+class QMenu;
+class QMessageBox;
+class QContextMenuEvent;
+class QFileDialog;
+class QUrl;
+class QDesktopServices;
+class QSettings;
+class QApplication;
class Attachments : public QWidget
{
diff --git a/attachmenttablemodel.h b/attachmenttablemodel.h
index cac8d7f..560df13 100644
--- a/attachmenttablemodel.h
+++ b/attachmenttablemodel.h
@@ -2,12 +2,11 @@
#define ATTACHMENTTABLEMODEL_H
#include "mime.h"
-
-#include <QAbstractTableModel>
-#include <QStandardItem>
#include <QIcon>
#include <QFile>
+#include <QAbstractTableModel>
+class QStandardItem;
class AttachmentTableModel : public QAbstractTableModel
{
diff --git a/editorpage.cpp b/editorpage.cpp
index e1e5939..dd34948 100644
--- a/editorpage.cpp
+++ b/editorpage.cpp
@@ -19,8 +19,6 @@
* MA 02110-1301, USA.
*/
-#include <QtGui>
-
#include "editorpage.h"
diff --git a/editorpage.h b/editorpage.h
index ada38eb..c0ae255 100644
--- a/editorpage.h
+++ b/editorpage.h
@@ -21,7 +21,9 @@
#ifndef EDITORPAGE_H
#define EDITORPAGE_H
+
#include <QPlainTextEdit>
+#include <QtGui>
class QVBoxLayout;
class QHBoxLayout;
diff --git a/fileencryptiondialog.cpp b/fileencryptiondialog.cpp
index 41c2639..c82d9ce 100755
--- a/fileencryptiondialog.cpp
+++ b/fileencryptiondialog.cpp
@@ -19,16 +19,6 @@
* MA 02110-1301, USA.
*/
-#include <QWidget>
-#include <QDialogButtonBox>
-#include <QLabel>
-#include <QPushButton>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QDebug>
-#include <QFileDialog>
-#include <QRadioButton>
-
#include "fileencryptiondialog.h"
FileEncryptionDialog::FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QStringList keyList, QWidget *parent)
diff --git a/fileencryptiondialog.h b/fileencryptiondialog.h
index bba1280..38d1da7 100755
--- a/fileencryptiondialog.h
+++ b/fileencryptiondialog.h
@@ -22,13 +22,21 @@
#ifndef __FILEENCRYPTIONDIALOG_H__
#define __FILEENCRYPTIONDIALOG_H__
-#include <QDialog>
-#include <QLineEdit>
-#include <QRadioButton>
-
#include "context.h"
#include "keylist.h"
+class QDialog;
+class QLineEdit;
+class QWidget;
+class QDialogButtonBox;
+class QLabel;
+class QPushButton;
+class QHBoxLayout;
+class QVBoxLayout;
+class QDebug;
+class QFileDialog;
+class QRadioButton;
+
class FileEncryptionDialog : public QDialog
{
Q_OBJECT
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 76cfda8..243ddb5 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -20,9 +20,6 @@
*/
#include "gpgwin.h"
-#include "fileencryptiondialog.h"
-#include "settingsdialog.h"
-#include "verifynotification.h"
GpgWin::GpgWin()
{
diff --git a/gpgwin.h b/gpgwin.h
index ea90907..8bf056c 100644
--- a/gpgwin.h
+++ b/gpgwin.h
@@ -30,6 +30,9 @@
#include "keydetailsdialog.h"
#include "textedit.h"
#include "keyserverimportdialog.h"
+#include "fileencryptiondialog.h"
+#include "settingsdialog.h"
+#include "verifynotification.h"
class QMainWindow;
class QPlainTextEdit;
diff --git a/keydetailsdialog.cpp b/keydetailsdialog.cpp
index 4d5bcdc..7248bb1 100644
--- a/keydetailsdialog.cpp
+++ b/keydetailsdialog.cpp
@@ -20,7 +20,6 @@
*/
#include "keydetailsdialog.h"
-//#include "QDebug"
KeyDetailsDialog::KeyDetailsDialog(GpgME::Context* ctx, gpgme_key_t key)
{
diff --git a/keydetailsdialog.h b/keydetailsdialog.h
index f15df48..f1150ed 100644
--- a/keydetailsdialog.h
+++ b/keydetailsdialog.h
@@ -22,6 +22,9 @@
#ifndef __KEYDETAILSDIALOG_H__
#define __KEYDETAILSDIALOG_H__
+#include "context.h"
+#include <gpgme.h>
+
class QDateTime;
class QVBoxLayout;
class QDialogButtonBox;
@@ -31,10 +34,6 @@ class QLabel;
class QGridLayout;
class QPushButton;
-#include "context.h"
-
-#include <gpgme.h>
-
class KeyDetailsDialog : public QDialog
{
Q_OBJECT
diff --git a/keygenthread.cpp b/keygenthread.cpp
index ee858fd..370d13a 100644
--- a/keygenthread.cpp
+++ b/keygenthread.cpp
@@ -19,10 +19,8 @@
* MA 02110-1301, USA.
*/
-
#include "keygenthread.h"
-
KeyGenThread::KeyGenThread(QString keyGenParams, GpgME::Context *ctx)
{
this->keyGenParams = keyGenParams;
diff --git a/keygenthread.h b/keygenthread.h
index e811301..91aead7 100644
--- a/keygenthread.h
+++ b/keygenthread.h
@@ -22,6 +22,7 @@
#ifndef __KEYGENTHREAD_H__
#define __KEYGENTHREAD_H__
+#include "context.h"
#include <qthread.h>
#include <iostream>
#include <string>
@@ -30,8 +31,6 @@
class QMessageBox;
-#include "context.h"
-
class KeyGenThread : public QThread
{
Q_OBJECT
diff --git a/keylist.cpp b/keylist.cpp
index f14f967..98f2fdb 100644
--- a/keylist.cpp
+++ b/keylist.cpp
@@ -19,7 +19,6 @@
* MA 02110-1301, USA.
*/
-
#include "keylist.h"
KeyList::KeyList(GpgME::Context *ctx, QString iconpath, QWidget *parent)
diff --git a/keymgmt.cpp b/keymgmt.cpp
index 4814c5a..1f75d0d 100755
--- a/keymgmt.cpp
+++ b/keymgmt.cpp
@@ -20,11 +20,8 @@
* MA 02110-1301, USA.
*/
-#include <QtGui>
-
#include "keymgmt.h"
-
KeyMgmt::KeyMgmt(GpgME::Context *ctx, QString iconpath)
{
mCtx = ctx;
diff --git a/keymgmt.h b/keymgmt.h
index 2d08edc..426d120 100755
--- a/keymgmt.h
+++ b/keymgmt.h
@@ -22,6 +22,12 @@
#ifndef __KEYMGMT_H__
#define __KEYMGMT_H__
+#include "context.h"
+#include "keylist.h"
+#include "keygenthread.h"
+#include "keydetailsdialog.h"
+#include "keyserverimportdialog.h"
+#include <QtGui>
class QMainWindow;
class QWidget;
@@ -36,12 +42,6 @@ class QMenu;
class QApplication;
class QSlider;
-#include "context.h"
-#include "keylist.h"
-#include "keygenthread.h"
-#include "keydetailsdialog.h"
-#include "keyserverimportdialog.h"
-
class KeyMgmt : public QMainWindow
{
Q_OBJECT
diff --git a/keyserverimportdialog.cpp b/keyserverimportdialog.cpp
index 9639965..703467a 100644
--- a/keyserverimportdialog.cpp
+++ b/keyserverimportdialog.cpp
@@ -20,9 +20,6 @@
* MA 02110-1301, USA.
*/
-#include <QtGui>
-#include <QtNetwork>
-#include <QPixmap>
#include "keyserverimportdialog.h"
KeyServerImportDialog::KeyServerImportDialog(GpgME::Context *ctx, QWidget *parent)
diff --git a/keyserverimportdialog.h b/keyserverimportdialog.h
index 18aa913..50c2025 100644
--- a/keyserverimportdialog.h
+++ b/keyserverimportdialog.h
@@ -23,14 +23,16 @@
#ifndef KEYSERVERIMPORTDIALOG_H
#define KEYSERVERIMPORTDIALOG_H
-#include <QDialog>
-#include <QDir>
-#include <QNetworkAccessManager>
-#include <QUrl>
-
#include "context.h"
+#include <QNetworkAccessManager>
+#include <QtNetwork>
QT_BEGIN_NAMESPACE
+class QDialog;
+class QDir;
+class QUrl;
+class QtGui;
+class QPixmap;
class QNetworkReply;
class QComboBox;
class QLabel;
diff --git a/mime.cpp b/mime.cpp
index 50c1b3d..c9d08eb 100644
--- a/mime.cpp
+++ b/mime.cpp
@@ -32,9 +32,6 @@
*/
#include "mime.h"
-#include <QDebug>
-#include <QHashIterator>
-#include <QTextCodec>
Mime::Mime(QByteArray *message)
{
diff --git a/mime.h b/mime.h
index b6268e3..cdd6675 100644
--- a/mime.h
+++ b/mime.h
@@ -22,10 +22,12 @@
#ifndef __MIME_H__
#define __MIME_H__
-#include <QByteArray>
+#include <QHashIterator>
#include <QHash>
-#include <QDebug>
+class QByteArray;
+class QDebug;
+class QTextCodec;
class HeadElem
{
diff --git a/quitdialog.cpp b/quitdialog.cpp
index 57574e8..6b16a5e 100755
--- a/quitdialog.cpp
+++ b/quitdialog.cpp
@@ -20,8 +20,6 @@
* MA 02110-1301, USA.
*/
-#include <QtGui>
-#include <QTableWidget>
#include "quitdialog.h"
QuitDialog::QuitDialog(QWidget *parent, QHash<int, QString> unsavedDocs, QString iconPath)
diff --git a/quitdialog.h b/quitdialog.h
index 58f1e45..e805b79 100755
--- a/quitdialog.h
+++ b/quitdialog.h
@@ -23,6 +23,8 @@
#define __QUITDIALOG_H__
#include "context.h"
+#include <QtGui>
+
class QTableWidget;
class QuitDialog : public QDialog
diff --git a/settingsdialog.cpp b/settingsdialog.cpp
index cffe169..cdd63ad 100755
--- a/settingsdialog.cpp
+++ b/settingsdialog.cpp
@@ -21,21 +21,6 @@
#include "settingsdialog.h"
-#include <QWidget>
-#include <QSettings>
-#include <QDebug>
-#include <QLabel>
-#include <QButtonGroup>
-#include <QSettings>
-#include <QApplication>
-#include <QDir>
-#include <QTranslator>
-#include <QtGui>
-
-class QLabel;
-class QButtonGroup;
-class QGroupBox;
-
SettingsDialog::SettingsDialog(QWidget *parent)
: QDialog(parent)
{
diff --git a/settingsdialog.h b/settingsdialog.h
index 2e39328..26b14a0 100755
--- a/settingsdialog.h
+++ b/settingsdialog.h
@@ -22,21 +22,30 @@
#ifndef __SETTINGSDIALOG_H__
#define __SETTINGSDIALOG_H__
-#include <QDialog>
-#include <QButtonGroup>
-#include <QGroupBox>
-#include <QRadioButton>
-#include <QDialogButtonBox>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QComboBox>
-#include <QCheckBox>
#include <QHash>
-
- class QFileInfo;
- class QTabWidget;
-
- class GeneralTab : public QWidget
+#include <QWidget>
+#include <QtGui>
+
+class QDialog;
+class QRadioButton;
+class QDialogButtonBox;
+class QHBoxLayout;
+class QVBoxLayout;
+class QComboBox;
+class QCheckBox;
+class QSettings;
+class QDebug;
+class QSettings;
+class QApplication;
+class QDir;
+class QTranslator;
+class QLabel;
+class QButtonGroup;
+class QGroupBox;
+class QFileInfo;
+class QTabWidget;
+
+class GeneralTab : public QWidget
{
Q_OBJECT
diff --git a/textedit.cpp b/textedit.cpp
index cc9682d..68e5ad9 100644
--- a/textedit.cpp
+++ b/textedit.cpp
@@ -19,11 +19,7 @@
* MA 02110-1301, USA.
*/
-#include "QDebug"
#include "textedit.h"
-#include "quitdialog.h"
-class QFileDialog;
-class QMessageBox;
TextEdit::TextEdit(QString iconPath)
{
diff --git a/textedit.h b/textedit.h
index 7c22577..247d1c9 100644
--- a/textedit.h
+++ b/textedit.h
@@ -22,16 +22,19 @@
#ifndef __TEXTEDIT_H__
#define __TEXTEDIT_H__
-#include <QPlainTextEdit>
-
-#include <QtGui>
-#include <QFileDialog>
-#include <QMessageBox>
-#include <QFileInfo>
-#include <QApplication>
-#include <QFile>
#include "editorpage.h"
+#include "quitdialog.h"
+class QDebug;
+class QtGui;
+class QFileDialog;
+class QMessageBox;
+class QFileInfo;
+class QApplication;
+class QFile;
+class QPlainTextEdit;
+class QFileDialog;
+class QMessageBox;
class QWidget;
class QString;
class QTabWidget;
diff --git a/verifynotification.h b/verifynotification.h
index 37adfcf..641d43e 100644
--- a/verifynotification.h
+++ b/verifynotification.h
@@ -1,16 +1,15 @@
#ifndef VERIFYNOTIFICATION_H
#define VERIFYNOTIFICATION_H
-#include <QLabel>
-#include <QHBoxLayout>
-#include <QMenu>
-#include <QPushButton>
-
-#include <QWidget>
-
#include "keyserverimportdialog.h"
#include "context.h"
#include <gpgme.h>
+#include <QWidget>
+
+class QLabel;
+class QHBoxLayout;
+class QMenu;
+class QPushButton;
typedef enum
{