qtprintsupport.cpp 610 B

1234567891011121314151617181920
  1. // Copyright (C) 2019 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. // @snippet setpagesize
  4. bool out = %CPPSELF.setPageSize(%1);
  5. %PYARG_0 = %CONVERTTOPYTHON[bool](out);
  6. // @snippet setpagesize
  7. // @snippet exec
  8. if (PyErr_WarnEx(PyExc_DeprecationWarning,
  9. "'exec_' will be removed in the future. "
  10. "Use 'exec' instead.",
  11. 1)) {
  12. return nullptr;
  13. }
  14. %BEGIN_ALLOW_THREADS
  15. int cppResult = %CPPSELF.exec();
  16. %END_ALLOW_THREADS
  17. %PYARG_0 = %CONVERTTOPYTHON[int](cppResult);
  18. // @snippet exec