Make WvStreams compile with gcc 4.4.
[wvstreams.git] / qt / wvqtstring.cc
blobb934158e5213aeea80129ece850b7cafd9cbea2d
1 /*
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 * Helper(s) to make WvString co-operate better with QString.
6 */
7 #include "wvstring.h"
8 #include <qstring.h>
10 #include <stdio.h>
12 WvFastString::WvFastString(const QString &s)
14 // fprintf(stderr, "ffqs: '%s'\n", s.latin1());
16 #if 1
17 link(&nullbuf, NULL);
18 *this = WvString(s);
19 #else
20 // just copy the pointer - no need to allocate memory!
21 str = (char *)s.latin1(); // I promise not to change anything!
22 buf = NULL;
23 #endif
27 WvFastString::WvFastString(const QCString &s)
29 // fprintf(stderr, "ffqcs: '%s'\n", (const char *)s);
31 #if 1
32 link(&nullbuf, NULL);
33 *this = WvString(s);
34 #else
35 // just copy the pointer - no need to allocate memory!
36 str = (char *)(const char *)s; // I promise not to change anything!
37 buf = NULL;
38 #endif
42 WvFastString::operator QString () const
44 return cstr();
48 WvString::WvString(const QString &s)
50 // fprintf(stderr, "ssqs: '%s'\n", s.latin1());
52 link(&nullbuf, s);
53 unique();
57 WvString::WvString(const QCString &s)
59 // fprintf(stderr, "ssqcs: '%s'\n", (const char *)s);
61 link(&nullbuf, s);
62 unique();