Skip to content

Commit d5543ba

Browse files
author
Lauris Kaplinski
committed
Removed commented out code
1 parent 84b2d41 commit d5543ba

File tree

4 files changed

+4
-18
lines changed

4 files changed

+4
-18
lines changed

client/CDocSupport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ struct IOEntry
132132
{
133133
std::string name, mime;
134134
int64_t size;
135-
//std::shared_ptr<std::istream> stream;
136135
std::unique_ptr<QIODevice> data;
137136
};
138137

client/CryptoDoc.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ class CryptoDoc::Private final: public QThread
9494
std::string writer_last_error;
9595

9696
QString fileName;
97-
//bool encrypted = false;
98-
//bool isEncrypted() const { return encrypted; }
9997
bool isEncrypted() const { return reader != nullptr; }
10098
CDocumentModel *documents = new CDocumentModel(this);
10199
QStringList tempFiles;
@@ -543,16 +541,12 @@ bool CryptoDoc::move(const QString &to)
543541

544542
bool CryptoDoc::open( const QString &file )
545543
{
544+
d->writer_last_error.clear();
546545
clear(file);
547546
d->reader = d->createCDocReader(file.toStdString());
548-
if (!d->reader) return false;
549-
d->writer_last_error.clear();
550-
// fixme: This seems wrong
551-
//if(!d->isEncrypted()) {
552-
// WarningDialog::show(tr("Failed to open document"),
553-
// QString::fromStdString(d->cdoc->lastError));
554-
// return false;
555-
//}
547+
if (!d->reader) {
548+
return false;
549+
}
556550
Application::addRecent( file );
557551
return true;
558552
}

client/MainWindow.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ bool MainWindow::encrypt(bool askForKey)
335335
if(!p.exec()) return false;
336336
QString label = p.label();
337337
QByteArray secret = p.secret();
338-
bool result;
339338
if (p.type == PasswordDialog::Type::PASSWORD) {
340339
WaitDialogHolder waitDialog(this, tr("Encrypting"));
341340
return cryptoDoc->encrypt(cryptoDoc->fileName(), label, secret, 65536);
@@ -518,11 +517,6 @@ void MainWindow::convertToCDoc() {
518517

519518
auto cardData = qApp->signer()->tokenauth();
520519
if (!cardData.cert().isNull()) {
521-
// QByteArray qder = cardData.cert().toDer();
522-
// st7d::vector<uint8_t> sder = std::vector<uint8_t>(qder.cbegin(),
523-
// qder.cend());
524-
// cryptoContainer->addEncryptionKey(libcdoc::Recipient::makeCertificate(CryptoDoc::labelFromCertificate(sder),
525-
// sder));
526520
cryptoContainer->addEncryptionKey(cardData.cert());
527521
}
528522

client/dialogs/KeyDialog.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ KeyDialog::KeyDialog(const CDKey &k, QWidget *parent) : QDialog(parent) {
8686
d->view->addTopLevelItem(i);
8787
};
8888

89-
bool adjust_size = false;
9089
if (k.lock.isCDoc1()) {
9190
std::vector<uint8_t> cert =
9291
k.lock.getBytes(libcdoc::Lock::Params::CERT);

0 commit comments

Comments
 (0)