File indexing completed on 2024-05-19 05:05:35

0001 #ifndef FILEIMPORTER_P_H
0002 #define FILEIMPORTER_P_H
0003 
0004 #define check_if_iodevice_invalid(iodevice)    if (iodevice == nullptr || (!iodevice->isReadable() && !iodevice->open(QIODevice::ReadOnly))) { \
0005         qCWarning(LOG_KBIBTEX_IO) << "Input device not readable"; \
0006         Q_EMIT message(MessageSeverity::Error, QStringLiteral("Input device not readable")); \
0007         return nullptr; \
0008     } else if (iodevice->atEnd() || iodevice->size() <= 0) { \
0009         qCWarning(LOG_KBIBTEX_IO) << "Input device at end or does not contain any data"; \
0010         Q_EMIT message(MessageSeverity::Warning, QStringLiteral("Input device at end or does not contain any data")); \
0011         return new File(); \
0012     }
0013 
0014 #endif // FILEIMPORTER_P_H