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

0001 #ifndef FILEEXPORTER_P_H
0002 #define FILEEXPORTER_P_H
0003 
0004 #define check_if_bibtexfile_or_iodevice_invalid(bibtexfile,iodevice)    if (bibtexfile == nullptr) { \
0005         qCWarning(LOG_KBIBTEX_IO) << "No bibliography to write given"; \
0006         return false; \
0007     } else if (iodevice == nullptr || (!iodevice->isWritable() && !iodevice->open(QIODevice::WriteOnly))) { \
0008         qCWarning(LOG_KBIBTEX_IO) << "Output device not writable"; \
0009         return false; \
0010     } else if (bibtexfile->isEmpty()) { \
0011         qCDebug(LOG_KBIBTEX_IO) << "Bibliography is empty"; \
0012     }
0013 
0014 #define check_if_iodevice_invalid(iodevice)    if (iodevice == nullptr || (!iodevice->isWritable() && !iodevice->open(QIODevice::WriteOnly))) { \
0015         qCWarning(LOG_KBIBTEX_IO) << "Output device not writable"; \
0016         return false; \
0017     }
0018 
0019 #endif // FILEEXPORTER_P_H