]> git.lyx.org Git - lyx.git/blobdiff - src/PrinterParams.cpp
Check path of Qt tools if qtchooser is detected
[lyx.git] / src / PrinterParams.cpp
index 0a6620f6c6d27f1d839f3828e6a284607ad482ad..9da9c9a891c66d2d44ad88253ac4f61e32355867 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "LyXRC.h"
 
-#include "support/assert.h"
+#include "support/lassert.h"
 #include "support/lstrings.h"
 
 
@@ -23,8 +23,6 @@ namespace lyx {
 PrinterParams::PrinterParams() 
 {
        target = PRINTER;
-       printer_name = lyxrc.printer;
-       file_name = std::string();
        all_pages = true;
        from_page = 1;
        to_page = 0;
@@ -40,17 +38,21 @@ PrinterParams::PrinterParams()
 
 void PrinterParams::testInvariant() const
 {
+#ifdef ENABLE_ASSERTIONS
        switch (target) {
        case PRINTER:
-               LASSERT(!printer_name.empty(), /**/);
+               // We can't do this test, because no default printer
+               // may have been set.
+               // LASSERT(!printer_name.empty(), /**/);
                break;
        case FILE:
-               LASSERT(!file_name.empty(), /**/);
+               LATTEST(!file_name.empty());
                break;
        default:
-               LASSERT(false, /**/);
+               LATTEST(false);
                break;
        }
+#endif
 }