summaryrefslogtreecommitdiff
path: root/cad/qcad/files/patch-zzz-ioexcept
blob: 9308d63071dd32117a423bd074ee9497c02a8fc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
--- dxflib/src/dl_writer_ascii.h.orig	2005-11-22 12:46:58.000000000 +0100
+++ dxflib/src/dl_writer_ascii.h	2010-08-05 23:56:19.000000000 +0200
@@ -50,7 +50,9 @@
 class DL_WriterA : public DL_Writer {
 public:
     DL_WriterA(char* fname, DL_Codes::version version=VER_2000)
-            : DL_Writer(version), m_ofile(fname) {}
+            : DL_Writer(version), m_ofile(fname) {
+      m_ofile.exceptions(std::ofstream::failbit);
+    }
     virtual ~DL_WriterA() {}
 
 	bool openFailed() const;
--- qcadlib/src/filters/rs_filterdxf.cpp.orig	2005-11-22 12:52:41.000000000 +0100
+++ qcadlib/src/filters/rs_filterdxf.cpp	2010-08-05 23:55:40.000000000 +0200
@@ -1187,6 +1187,7 @@
         exportVersion = DL_Codes::AC1015;
     }
 
+    try {
     //DL_WriterA* dw = dxf.out(file, VER_R12);
     DL_WriterA* dw = dxf.out((const char*)QFile::encodeName(file), exportVersion);
 
@@ -1376,6 +1377,10 @@
     dw->close();
 
     delete dw;
+    } catch (std::ios::failure &e) {
+        RS_DEBUG->print("RS_FilterDXF::fileExport: ios::failure exception caught");
+	return false;
+    }
 
     // check if file was actually written (strange world of windoze xp):
     if (RS_FileInfo(file).exists()==false) {
--- qcad/src/ts/qcad_en.ts.orig	2005-11-22 12:49:30.000000000 +0100
+++ qcad/src/ts/qcad_en.ts	2010-08-06 00:00:02.000000000 +0200
@@ -238,7 +238,8 @@
     <message>
         <source>Cannot save the file
 %1
-Please check the permissions.</source>
+Please check the permissions
+and filesystem status (full?).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
--- qcad/src/ts/qcad_de.ts.orig	2005-11-22 12:49:31.000000000 +0100
+++ qcad/src/ts/qcad_de.ts	2010-08-06 00:00:53.000000000 +0200
@@ -319,10 +319,12 @@
     <message>
         <source>Cannot save the file
 %1
-Please check the permissions.</source>
+Please check the permissions
+and filesystem status (full?).</source>
         <translation>Kann Datei
 %1
-nicht speichern. Bitte prüfen Sie die Berechtigung.</translation>
+nicht speichern. Bitte prüfen Sie die Berechtigung
+sowie den Zustand des Dateisystems (voll?).</translation>
     </message>
     <message>
         <source>Help</source>
--- qcad/src/ts/qcad_cs.ts.orig	2005-11-22 12:49:30.000000000 +0100
+++ qcad/src/ts/qcad_cs.ts	2010-08-06 00:05:58.000000000 +0200
@@ -300,10 +300,12 @@
     <message>
         <source>Cannot save the file
 %1
-Please check the permissions.</source>
+Please check the permissions
+and filesystem status (full?).</source>
         <translation>Nelze uložit soubor
 %1
-Zkontrolujte prosím přístupová práva.</translation>
+Zkontrolujte prosím přístupová práva
+a místo na zařizení.</translation>
     </message>
     <message>
         <source>&amp;CAM</source>
--- qcad/src/ts/qcad_ru.ts.orig	2005-11-22 12:49:31.000000000 +0100
+++ qcad/src/ts/qcad_ru.ts	2010-08-06 00:08:18.000000000 +0200
@@ -288,10 +288,12 @@
     <message>
         <source>Cannot save the file
 %1
-Please check the permissions.</source>
+Please check the permissions
+and filesystem status (full?).</source>
         <translation>Невозможно сохранить файл
 %1
-Проверьте, пожалуйста, права доступа.</translation>
+Проверьте, пожалуйста, права доступа
+и свободное место на файлсистеме.</translation>
     </message>
     <message>
         <source>Launch the online manual</source>
--- qcad/src/qc_applicationwindow.cpp~	2010-08-05 23:41:32.000000000 +0200
+++ qcad/src/qc_applicationwindow.cpp	2010-08-05 23:59:26.000000000 +0200
@@ -2111,7 +2111,8 @@
                 // error
                 QMessageBox::information(this, QMessageBox::tr("Warning"),
                                          tr("Cannot save the file\n%1\nPlease "
-                                            "check the permissions.")
+                                            "check the permissions\n"
+					    "and filesystem status (full?).")
                                          .arg(w->getDocument()->getFilename()),
                                          QMessageBox::Ok);
             }