forked from len0rd/rockbox
Add wpseditor, the Google Summer of Code 2008 project of Rostislav Chekan. Closes FS#9327
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18362 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cc31b1fbda
commit
5d22e3cbdd
57 changed files with 3711 additions and 33 deletions
28
utils/wpseditor/gui/src/utils.cpp
Normal file
28
utils/wpseditor/gui/src/utils.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "utils.h"
|
||||
#include <QPointer>
|
||||
#include <QtGlobal>
|
||||
#include "qwpseditorwindow.h"
|
||||
|
||||
extern QPointer<QWpsEditorWindow> win;
|
||||
|
||||
int qlogger(const char* fmt,...) {
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
QString s;
|
||||
s.vsprintf(fmt,ap);
|
||||
va_end(ap);
|
||||
s.replace("\n","");
|
||||
//qDebug()<<s;
|
||||
if (win==0)
|
||||
qDebug()<<s;
|
||||
if (s.indexOf("ERR")>=0)
|
||||
s = "<font color=red>"+s+"</font>";
|
||||
if (win!=0)
|
||||
win->logMsg(s);
|
||||
va_end(ap);
|
||||
return s.length();
|
||||
}
|
||||
|
||||
int qlogger(const QString& s) {
|
||||
return qlogger(s.toAscii().data());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue