mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Remove fopen_error() and its last user.
This commit is contained in:
parent
6061c05bac
commit
9aa2525fab
@ -118,12 +118,6 @@ const char *pki_base::getClassName() const
|
||||
return typeid(*this).name();
|
||||
}
|
||||
|
||||
void pki_base::fopen_error(const QString &fname) const
|
||||
{
|
||||
my_error(tr("Error opening file: '%1': %2").
|
||||
arg(fname).arg(strerror(errno)));
|
||||
}
|
||||
|
||||
void pki_base::my_error(const QString &error) const
|
||||
{
|
||||
if (!error.isEmpty()) {
|
||||
|
||||
@ -62,7 +62,6 @@ class pki_base : public QObject
|
||||
/* model data */
|
||||
pki_base *parent;
|
||||
void my_error(const QString &error) const;
|
||||
void fopen_error(const QString &fname) const;
|
||||
virtual void PEM_file_comment(XFile &file) const;
|
||||
|
||||
public:
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "load_obj.h"
|
||||
#include "exception.h"
|
||||
#include "func.h"
|
||||
#include "xfile.h"
|
||||
#include "widgets/MainWindow.h"
|
||||
#include <QList>
|
||||
|
||||
@ -89,14 +90,10 @@ static pki_base *pkiByPEM(QString text, int *skip)
|
||||
|
||||
void pki_multi::fload(const QString fname)
|
||||
{
|
||||
QFile file(fname);
|
||||
XFile file(fname);
|
||||
QByteArray ba;
|
||||
|
||||
file.open(QFile::ReadOnly);
|
||||
if (file.error()) {
|
||||
fopen_error(fname);
|
||||
return;
|
||||
}
|
||||
file.open_read();
|
||||
ba = file.readAll();
|
||||
fromPEMbyteArray(ba, fname);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user