diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch) | |
tree | 67208f7c145782a7e90b123b982ca78d88cc2c87 /libkmime/kmime_warning.h | |
download | tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkmime/kmime_warning.h')
-rw-r--r-- | libkmime/kmime_warning.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libkmime/kmime_warning.h b/libkmime/kmime_warning.h new file mode 100644 index 000000000..97b714a9e --- /dev/null +++ b/libkmime/kmime_warning.h @@ -0,0 +1,32 @@ +#ifndef KMIME_NO_WARNING +# include <kdebug.h> +# define KMIME_WARN kdWarning(5100) << "Tokenizer Warning: " +# define KMIME_WARN_UNKNOWN(x,y) KMIME_WARN << "unknown " #x ": \"" \ + << y << "\"" << endl; +# define KMIME_WARN_UNKNOWN_ENCODING KMIME_WARN << "unknown encoding in " \ + "RFC 2047 encoded-word (only know 'q' and 'b')" << endl; +# define KMIME_WARN_UNKNOWN_CHARSET(c) KMIME_WARN << "unknown charset \"" \ + << c << "\" in RFC 2047 encoded-word" << endl; +# define KMIME_WARN_8BIT(ch) KMIME_WARN \ + << "8Bit character '" << QString(QChar(ch)) << "'" << endl +# define KMIME_WARN_IF_8BIT(ch) if ( (unsigned char)(ch) > 127 ) \ + { KMIME_WARN_8BIT(ch); } +# define KMIME_WARN_PREMATURE_END_OF(x) KMIME_WARN \ + << "Premature end of " #x << endl +# define KMIME_WARN_LONE(x) KMIME_WARN << "Lonely " #x " character" << endl +# define KMIME_WARN_NON_FOLDING(x) KMIME_WARN << "Non-folding " #x << endl +# define KMIME_WARN_CTL_OUTSIDE_QS(x) KMIME_WARN << "Control character " \ + #x " outside quoted-string" << endl +# define KMIME_WARN_INVALID_X_IN_Y(X,Y) KMIME_WARN << "Invalid character '" \ + QString(QChar(X)) << "' in " #Y << endl; +# define KMIME_WARN_TOO_LONG(x) KMIME_WARN << #x \ + " too long or missing delimiter" << endl; +#else +# define KMIME_NOP do {} while (0) +# define KMIME_WARN_8BIT(ch) KMIME_NOP +# define KMIME_WARN_IF_8BIT(ch) KMIME_NOP +# define KMIME_WARN_PREMATURE_END_OF(x) KMIME_NOP +# define KMIME_WARN_LONE(x) KMIME_NOP +# define KMIME_WARN_NON_FOLDING(x) KMIME_NOP +# define KMIME_WARN_CTL_OUTSIDE_QS(x) KMIME_NOP +#endif |