mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-27 20:14:32 +00:00
respect blank lines in diagnostic text
svn path=/trunk/kdesupport/qca/; revision=810529
This commit is contained in:
parent
232fcd3c84
commit
3fba35bfcf
@ -130,7 +130,9 @@ static void output_plugin_diagnostic_text()
|
||||
{
|
||||
QString str = QCA::pluginDiagnosticText();
|
||||
QCA::clearPluginDiagnosticText();
|
||||
QStringList lines = str.split('\n', QString::SkipEmptyParts);
|
||||
if(str[str.length()-1] == '\n')
|
||||
str.truncate(str.length()-1);
|
||||
QStringList lines = str.split('\n', QString::KeepEmptyParts);
|
||||
for(int n = 0; n < lines.count(); ++n)
|
||||
fprintf(stderr, "plugin: %s\n", qPrintable(lines[n]));
|
||||
}
|
||||
@ -139,7 +141,9 @@ static void output_keystore_diagnostic_text()
|
||||
{
|
||||
QString str = QCA::KeyStoreManager::diagnosticText();
|
||||
QCA::KeyStoreManager::clearDiagnosticText();
|
||||
QStringList lines = str.split('\n', QString::SkipEmptyParts);
|
||||
if(str[str.length()-1] == '\n')
|
||||
str.truncate(str.length()-1);
|
||||
QStringList lines = str.split('\n', QString::KeepEmptyParts);
|
||||
for(int n = 0; n < lines.count(); ++n)
|
||||
fprintf(stderr, "keystore: %s\n", qPrintable(lines[n]));
|
||||
}
|
||||
@ -147,7 +151,9 @@ static void output_keystore_diagnostic_text()
|
||||
static void output_message_diagnostic_text(QCA::SecureMessage *msg)
|
||||
{
|
||||
QString str = msg->diagnosticText();
|
||||
QStringList lines = str.split('\n', QString::SkipEmptyParts);
|
||||
if(str[str.length()-1] == '\n')
|
||||
str.truncate(str.length()-1);
|
||||
QStringList lines = str.split('\n', QString::KeepEmptyParts);
|
||||
for(int n = 0; n < lines.count(); ++n)
|
||||
fprintf(stderr, "message: %s\n", qPrintable(lines[n]));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user