aboutsummaryrefslogtreecommitdiffstats
path: root/gpgwin.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-01 23:53:51 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-01 23:53:51 +0000
commit6ce7b92a92cc6785a2d155bb25024ffbd15958ae (patch)
tree688ed2b0c3e2160e2ab414fb436caa12f56c2d70 /gpgwin.cpp
parentadded GPL to textedit-files (diff)
downloadgpg4usb-6ce7b92a92cc6785a2d155bb25024ffbd15958ae.tar.gz
gpg4usb-6ce7b92a92cc6785a2d155bb25024ffbd15958ae.zip
added tabs to editor, but VERY buggy till now
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@418 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgwin.cpp')
-rw-r--r--gpgwin.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index b76b72f..d33b54c 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -437,16 +437,17 @@ void GpgWin::encrypt()
QStringList *uidList = mKeyList->getChecked();
QByteArray *tmp = new QByteArray();
- if (mCtx->encrypt(uidList, edit->toPlainText().toUtf8(), tmp)) {
+// if (mCtx->encrypt(uidList, edit.curTextPage.toPlainText().toUtf8(), tmp)) {
+ if (mCtx->encrypt(uidList, edit->curTextPage()->toPlainText().toUtf8(), tmp)) {
QString *tmp2 = new QString(*tmp);
- edit->setPlainText(*tmp2);
+ edit->curTextPage()->setPlainText(*tmp2);
}
}
void GpgWin::decrypt()
{
QByteArray *decrypted = new QByteArray();
- QByteArray text = edit->toPlainText().toAscii(); // TODO: toUtf8() here?
+ QByteArray text = edit->curTextPage()->toPlainText().toAscii(); // TODO: toUtf8() here?
preventNoDataErr(&text);
mCtx->decrypt(text, decrypted);
if (!decrypted->isEmpty()) {
@@ -479,7 +480,7 @@ void GpgWin::decrypt()
}
}
- edit->setPlainText(QString::fromUtf8(*decrypted));
+ edit->curTextPage()->setPlainText(QString::fromUtf8(*decrypted));
//edit->setPlainText(*decrypted);
}
}
@@ -566,7 +567,7 @@ void GpgWin::preventNoDataErr(QByteArray *in)
void GpgWin::importKeyFromEdit()
{
- mCtx->importKey(edit->toPlainText().toAscii());
+ mCtx->importKey(edit->curTextPage()->toPlainText().toAscii());
}
void GpgWin::importKeyFromClipboard()
@@ -613,15 +614,15 @@ void GpgWin::sign() {
QStringList *uidList = mKeyList->getChecked();
QByteArray *tmp = new QByteArray();
- if (mCtx->sign(uidList, edit->toPlainText().toUtf8(), tmp)) {
+ if (mCtx->sign(uidList, edit->curTextPage()->toPlainText().toUtf8(), tmp)) {
QString *tmp2 = new QString(*tmp);
- edit->setPlainText(*tmp2);
+ edit->curTextPage()->setPlainText(*tmp2);
}
}
void GpgWin::verify() {
- mCtx->verify(edit->toPlainText().toUtf8());
+ mCtx->verify(edit->curTextPage()->toPlainText().toUtf8());
}
@@ -673,7 +674,7 @@ void GpgWin::appendSelectedKeys()
QByteArray *keyArray = new QByteArray();
mCtx->exportKeys(mKeyList->getSelected(), keyArray);
- edit->appendPlainText(*keyArray);
+ edit->curTextPage()->appendPlainText(*keyArray);
}
void GpgWin::fileEncryption()