Skip to content

Commit d08baf3

Browse files
Revert "[linux] fix bug 73908"
This reverts commit d6a20c6.
1 parent d6a20c6 commit d08baf3

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

win-linux/src/platform_linux/gtkprintdialog.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include <algorithm>
99
#include <gdk/gdkx.h>
1010
#include <gtk/gtkunixprint.h>
11-
#include <cups/cups.h>
12-
#include <cups/ppd.h>
1311
#include "components/cmessage.h"
1412

1513
#define PDF_PRINTER_NAME "Print to File"
@@ -124,18 +122,6 @@ static GtkPageRange *get_page_ranges(GtkEntry *entry, gint *num_ranges)
124122
return NULL;
125123
}
126124

127-
static bool isOrientationSupported(const char *printerName) {
128-
const char *ppd = cupsGetPPD(printerName);
129-
if (!ppd)
130-
return true;
131-
if (ppd_file_t *ppdF = ppdOpenFile(ppd)) {
132-
bool orientation_supported = ppdFindOption(ppdF, "Orientation");
133-
ppdClose(ppdF);
134-
return orientation_supported;
135-
}
136-
return true;
137-
}
138-
139125
auto gtkPaperNameFromPageSize(const QSizeF &size)->QString
140126
{
141127
QString gtkPaperName;
@@ -517,7 +503,7 @@ QDialog::DialogCode GtkPrintDialog::exec()
517503
QPrinter::Landscape
518504
};
519505
const int print_ornt = (int)orient;
520-
m_printer->setOrientation((print_ornt == 0 || print_ornt == 2 || !isOrientationSupported(m_printer->printerName().toLocal8Bit())) ?
506+
m_printer->setOrientation((print_ornt == 0 || print_ornt == 2) ?
521507
orient_arr[0] : orient_arr[1]);
522508
}
523509
break;

0 commit comments

Comments
 (0)