kwave  18.07.70
String.h
Go to the documentation of this file.
1 /***************************************************************************
2  String.h - some commonly used string conversion
3  -------------------
4  begin : Sat Dec 08 2011
5  copyright : (C) 2012 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef KWAVE_STRING_H
19 #define KWAVE_STRING_H
20 
21 #include "config.h"
22 
23 #include <QLatin1String>
24 #include <QString>
25 
26 /*
27  * This is a workaround for compiling Kwave with QT_NO_CAST_FROM_ASCII,
28  * which is really pain in the a**.
29  * Instead of spilling the whole source code with useless thousands
30  * of QLatin1String(...) conversions, we use a small conversion
31  * function in that case, which does not blow up the code so much...
32  */
33 
41 static inline QString _(const char *s) { return QLatin1String(s); }
42 
48 #define UTF8(qs) ((qs).toUtf8().data())
49 
55 #define DBG(qs) qPrintable(qs)
56 
57 #endif /* KWAVE_STRING_H */
58 
59 //***************************************************************************
60 //***************************************************************************
static QString _(const char *s)
Definition: String.h:41