Skip to content

Commit a2012fa

Browse files
committed
Add second ctor in Export classes to remove default nullptr parent parameter.
1 parent da67a52 commit a2012fa

File tree

6 files changed

+12
-3
lines changed

6 files changed

+12
-3
lines changed

include/eible/ExportData.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class EIBLE_EXPORT ExportData : public QObject
1414
{
1515
Q_OBJECT
1616
public:
17-
explicit ExportData(QObject* parent = nullptr);
17+
explicit ExportData(QObject* parent);
18+
ExportData();
1819

1920
/// @brief Export data from view to ioDevice.
2021
/// @param view Source of data.

include/eible/ExportDsv.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class EIBLE_EXPORT ExportDsv : public ExportData
1616
public:
1717
/// @brief Constructor.
1818
/// @param separator Separator to be used during export (comma, tab, ...).
19-
explicit ExportDsv(char separator, QObject* parent = nullptr);
19+
ExportDsv(char separator, QObject* parent);
20+
explicit ExportDsv(char separator);
2021

2122
/// @brief Change date format to given one via Qt::DateFormat. (overloaded)
2223
/// @param format New format for dates as Qt::DateFormat.

include/eible/ExportXlsx.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ class EIBLE_EXPORT ExportXlsx : public ExportData
1515
{
1616
Q_OBJECT
1717
public:
18-
explicit ExportXlsx(QObject* parent = nullptr);
18+
explicit ExportXlsx(QObject* parent);
19+
ExportXlsx();
1920

2021
protected:
2122
bool writeContent(const QByteArray& content, QIODevice& ioDevice) override;

src/ExportData.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
ExportData::ExportData(QObject* parent) : QObject(parent) {}
77

8+
ExportData::ExportData() : ExportData(nullptr) {}
9+
810
bool ExportData::exportView(const QAbstractItemView& view, QIODevice& ioDevice)
911
{
1012
const QAbstractItemModel* model{view.model()};

src/ExportDsv.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ExportDsv::ExportDsv(char separator, QObject* parent)
1010
{
1111
}
1212

13+
ExportDsv::ExportDsv(char separator) : ExportDsv(separator, nullptr) {}
14+
1315
QByteArray ExportDsv::getEmptyContent() { return {}; }
1416

1517
QByteArray ExportDsv::generateHeaderContent(const QAbstractItemModel& model)

src/ExportXlsx.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
ExportXlsx::ExportXlsx(QObject* parent) : ExportData(parent) {}
1313

14+
ExportXlsx::ExportXlsx() : ExportXlsx(nullptr) {}
15+
1416
bool ExportXlsx::writeContent(const QByteArray& content, QIODevice& ioDevice)
1517
{
1618
QFile xlsxTemplate(QStringLiteral(":/") + utilities::getXlsxTemplateName());

0 commit comments

Comments
 (0)