mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Remove Q_WS_X11 from main.cpp and change it to Q_OS_LINUX in reports.cpp
This commit is contained in:
parent
41efbcab38
commit
e210813156
@ -42,11 +42,6 @@
|
||||
#include "SleepLib/loader_plugins/icon_loader.h"
|
||||
#include "SleepLib/loader_plugins/weinmann_loader.h"
|
||||
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
|
||||
MainWindow *mainwin = nullptr;
|
||||
|
||||
int compareVersion(QString version);
|
||||
@ -257,9 +252,6 @@ int main(int argc, char* argv[])
|
||||
#else
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
#ifdef Q_WS_X11
|
||||
XInitThreads();
|
||||
#endif
|
||||
|
||||
QString homeDocs = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)+"/";
|
||||
QCoreApplication::setApplicationName(getAppName());
|
||||
|
@ -39,8 +39,6 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date)
|
||||
return;
|
||||
}
|
||||
|
||||
//QString username = p_profile->Get(QString("_{") + QString(STR_UI_UserName) + "}_");
|
||||
|
||||
bool print_bookmarks = false;
|
||||
|
||||
if (name == STR_TR_Daily) {
|
||||
@ -69,7 +67,8 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date)
|
||||
|
||||
printer = new QPrinter(QPrinter::HighResolution);
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#ifdef Q_OS_LINUX
|
||||
QString username = p_profile->Get(QString("_{") + QString(STR_UI_UserName) + "}_");
|
||||
printer->setPrinterName("Print to File (PDF)");
|
||||
printer->setOutputFormat(QPrinter::PdfFormat);
|
||||
QString filename = p_pref->Get("{home}/") + name + username + date.toString(Qt::ISODate) + ".pdf";
|
||||
|
Loading…
Reference in New Issue
Block a user