summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/globalstuff.h
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/globalstuff.h') (more/less context) (show whitespace changes)
-rw-r--r--pwmanager/pwmanager/globalstuff.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/pwmanager/pwmanager/globalstuff.h b/pwmanager/pwmanager/globalstuff.h
index 090fcda..2e8f287 100644
--- a/pwmanager/pwmanager/globalstuff.h
+++ b/pwmanager/pwmanager/globalstuff.h
@@ -29,17 +29,17 @@
29 //US BUG: the following code caused compile errors with certain gcccompilers (2.95). 29 //US BUG: the following code caused compile errors with certain gcccompilers (2.95).
30 // Because of that I replaced it with a Qt version, which should do the same. 30 // Because of that I replaced it with a Qt version, which should do the same.
31#include <string> 31#include <string>
32 32
33#ifndef PWM_EMBEDDED 33#ifndef PWM_EMBEDDED
34#include <sstream> 34#include <sstream>
35#else 35#else
36#include <qstring.h> 36#include <qstring.h>
37#include <qtextstream.h> 37#include <QTextOStream>
38#endif 38#endif
39 39
40#ifndef CONFIG_KEYCARD 40#ifndef CONFIG_KEYCARD
41class QWidget; 41class QWidget;
42void no_keycard_support_msg_box(QWidget *parentWidget); 42void no_keycard_support_msg_box(QWidget *parentWidget);
43#endif // CONFIG_KEYCARD 43#endif // CONFIG_KEYCARD
44 44
45#ifdef PROG_NAME 45#ifdef PROG_NAME
@@ -92,17 +92,17 @@ std::string tostr(const T &t)
92 return s.str(); 92 return s.str();
93} 93}
94#else 94#else
95/** convert something to string using ostringstream */ 95/** convert something to string using ostringstream */
96template <class T> inline 96template <class T> inline
97std::string tostr(const T &t) 97std::string tostr(const T &t)
98{ 98{
99 QString result; 99 QString result;
100 QTextOStream(&result) << t; 100 QTextOStream tmp(&result); tmp << t;
101 return result.latin1(); 101 return result.latin1();
102} 102}
103#endif 103#endif
104 104
105/** delete the memory and NULL the pointer */ 105/** delete the memory and NULL the pointer */
106template<class T> inline 106template<class T> inline
107void delete_and_null(T *&p) 107void delete_and_null(T *&p)
108{ 108{