summaryrefslogtreecommitdiff
path: root/core
authorar <ar>2004-05-02 21:32:48 (UTC)
committer ar <ar>2004-05-02 21:32:48 (UTC)
commit0a4cac124105a5732e55cb34c6b37be75083a395 (patch) (side-by-side diff)
tree33b4d2cab08c9b58893540b4ddee089b69fc9c61 /core
parent109ed5f2a1cdfeb3680c9ec057a1083fcf8fab95 (diff)
downloadopie-0a4cac124105a5732e55cb34c6b37be75083a395.zip
opie-0a4cac124105a5732e55cb34c6b37be75083a395.tar.gz
opie-0a4cac124105a5732e55cb34c6b37be75083a395.tar.bz2
- convert qWarning to owarn
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.cpp4
-rw-r--r--core/launcher/packageslave.cpp3
-rw-r--r--core/launcher/transferserver.cpp3
-rw-r--r--core/obex/obex.cc47
-rw-r--r--core/opie-login/loginapplication.cpp15
-rw-r--r--core/pim/addressbook/namelineedit.cpp6
-rw-r--r--core/qws/transferserver.cpp6
7 files changed, 49 insertions, 35 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 6afbcd8..779fe54 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -666,14 +666,14 @@ void Launcher::applicationAdded( const QString& type, const AppLnk& app )
return;
LauncherView *view = tabs->view( type );
if ( view )
view->addItem( new AppLnk( app ), FALSE );
else
- qWarning("addAppLnk: No view for type %s. Can't add app %s!",
- type.latin1(),app.name().latin1() );
+ owarn << "addAppLnk: No view for type " << type.latin1() << ". Can't add app "
+ << app.name().latin1() << "!",
MimeType::registerApp( app );
}
void Launcher::applicationRemoved( const QString& type, const AppLnk& app )
{
diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp
index a11ac86..0461432 100644
--- a/core/launcher/packageslave.cpp
+++ b/core/launcher/packageslave.cpp
@@ -172,14 +172,13 @@ void PackageHandler::addPackageFiles( const QString &location,
#ifndef Q_OS_WIN32
odebug << "do symlink for " << s.ascii() << "" << oendl;
symlink( (location + s).ascii(), s.ascii() );
#else
odebug << "Copy file instead of a symlink for WIN32" << oendl;
if (!CopyFile((TCHAR*)qt_winTchar((location + s), TRUE), (TCHAR*)qt_winTchar(s, TRUE), FALSE))
- qWarning("Unable to create symlinkfor %s",
- (location + s).ascii());
+ owarn << "Unable to create symlinkfor " << (location + s).ascii() << oendl;
#endif
}
}
f.close();
}
}
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index c3f936e..1d4ca40 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -1153,14 +1153,13 @@ void ServerDTP::connected()
createTargzProc->kill();
}
bytes_written = 0;
odebug << "==>start send tar process" << oendl;
if ( !createTargzProc->start() )
- qWarning("Error starting %s",
- createTargzProc->arguments().join(" ").latin1());
+ owarn << "Error starting " << createTargzProc->arguments().join(" ").latin1() << oendl;
break;
case SendBuffer:
if ( !buf.open( IO_ReadOnly) ) {
emit failed();
mode = Idle;
return;
diff --git a/core/obex/obex.cc b/core/obex/obex.cc
index 3c99af6..7c40b90 100644
--- a/core/obex/obex.cc
+++ b/core/obex/obex.cc
@@ -1,12 +1,17 @@
+#include "obex.h"
+
+/* OPIE */
+#include <opie2/oprocess.h>
+#include <opie2/odebug.h>
+
+/* QT */
#include <qfileinfo.h>
-#include <opie2/oprocess.h>
-#include "obex.h"
using namespace OpieObex;
using namespace Opie::Core;
/* TRANSLATOR OpieObex::Obex */
@@ -26,53 +31,53 @@ Obex::~Obex() {
delete m_rec;
delete m_send;
}
void Obex::receive() {
m_receive = true;
m_outp = QString::null;
- qWarning("Receive" );
+ owarn << "Receive" << oendl;
m_rec = new OProcess();
*m_rec << "irobex_palm3";
// connect to the necessary slots
connect(m_rec, SIGNAL(processExited(Opie::Core::OProcess*) ),
this, SLOT(slotExited(Opie::Core::OProcess*) ) );
connect(m_rec, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ),
this, SLOT(slotStdOut(Opie::Core::OProcess*, char*, int) ) );
if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
- qWarning("could not start :(");
+ owarn << "could not start :(" oendl;
emit done( false );
delete m_rec;
m_rec = 0;
}
// emit currentTry(m_count );
}
void Obex::send( const QString& fileName) { // if currently receiving stop it send receive
m_count = 0;
m_file = fileName;
- qWarning("send %s", fileName.latin1() );
+ owarn << "send " << fileName.latin1() << oendl;
if (m_rec != 0 ) {
- qWarning("running");
+ owarn << "running" oendl;
if (m_rec->isRunning() ) {
emit error(-1 );
- qWarning("is running");
+ owarn << "is running" << oendl;
delete m_rec;
m_rec = 0;
}else{
- qWarning("is not running");
+ owarn << "is not running" << oendl;
emit error( -1 ); // we did not delete yet but it's not running slotExited is pending
return;
}
}
sendNow();
}
void Obex::sendNow(){
- qWarning("sendNow");
+ owarn << "sendNow" << oendl;
if ( m_count >= 25 ) { // could not send
emit error(-1 );
emit sent(false);
return;
}
// OProcess inititialisation
@@ -85,13 +90,13 @@ void Obex::sendNow(){
this, SLOT(slotExited(Opie::Core::OProcess*)) );
connect(m_send, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int )),
this, SLOT(slotStdOut(Opie::Core::OProcess*, char*, int) ) );
// now start it
if (!m_send->start(/*OProcess::NotifyOnExit, OProcess::AllOutput*/ ) ) {
- qWarning("could not send" );
+ owarn << "could not send" << oendl;
m_count = 25;
emit error(-1 );
delete m_send;
m_send=0;
}
// end
@@ -107,22 +112,22 @@ void Obex::slotExited(OProcess* proc ){
}
}
void Obex::slotStdOut(OProcess* proc, char* buf, int len){
if ( proc == m_rec ) { // only receive
QByteArray ar( len );
memcpy( ar.data(), buf, len );
- qWarning("parsed: %s", ar.data() );
+ owarn << "parsed: " << ar.data() << oendl;
m_outp.append( ar );
}
}
void Obex::received() {
if (m_rec->normalExit() ) {
if ( m_rec->exitStatus() == 0 ) { // we got one
QString filename = parseOut();
- qWarning("ACHTUNG %s", filename.latin1() );
+ owarn << "ACHTUNG " << filename.latin1() << oendl;
emit receivedFile( filename );
}
}else{
emit done(false);
};
delete m_rec;
@@ -132,19 +137,19 @@ void Obex::received() {
void Obex::sendEnd() {
if (m_send->normalExit() ) {
if ( m_send->exitStatus() == 0 ) {
delete m_send;
m_send=0;
- qWarning("done" );
+ owarn << "done" << oendl;
emit sent(true);
}else if (m_send->exitStatus() == 255 ) { // it failed maybe the other side wasn't ready
// let's try it again
delete m_send;
m_send = 0;
- qWarning("try sending again" );
+ owarn << "try sending again" << oendl;
sendNow();
}
}else {
emit error( -1 );
delete m_send;
m_send = 0;
@@ -155,46 +160,46 @@ QString Obex::parseOut( ){
QStringList list = QStringList::split("\n", m_outp);
QStringList::Iterator it;
for (it = list.begin(); it != list.end(); ++it ) {
if ( (*it).startsWith("Wrote" ) ) {
int pos = (*it).findRev('(' );
if ( pos > 0 ) {
- qWarning( "%d %s", pos, (*it).mid(6 ).latin1() ) ;
- qWarning("%d %d", (*it).length(), (*it).length()-pos );
+ owarn << pos << " " << (*it).mid(6 ).latin1() << oendl;
+ owarn << (*it).length() << " " << (*it).length()-pos << oendl;
path = (*it).remove( pos, (*it).length() - pos );
- qWarning("%s", path.latin1() );
+ owarn << path.latin1() << oendl;
path = path.mid(6 );
path = path.stripWhiteSpace();
- qWarning("path %s", path.latin1() );
+ owarn << "path " << path.latin1() << oendl;
}
}
}
return path;
}
/**
* when sent is done slotError is called we will start receive again
*/
void Obex::slotError() {
- qWarning("slotError");
+ owarn << "slotError" << oendl;
if ( m_receive )
receive();
};
void Obex::setReceiveEnabled( bool receive ) {
if ( !receive ) { //
m_receive = false;
shutDownReceive();
}
}
void Obex::shutDownReceive() {
if (m_rec != 0 ) {
- qWarning("running");
+ owarn << "running" << oendl;
if (m_rec->isRunning() ) {
emit error(-1 );
- qWarning("is running");
+ owarn << "is running" << oendl;
delete m_rec;
m_rec = 0;
}
}
}
diff --git a/core/opie-login/loginapplication.cpp b/core/opie-login/loginapplication.cpp
index 1facf2d..764b24b 100644
--- a/core/opie-login/loginapplication.cpp
+++ b/core/opie-login/loginapplication.cpp
@@ -22,12 +22,20 @@
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
+#include "loginapplication.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+
+/* QT */
+
+/* STD */
#include <pwd.h>
#include <grp.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/stat.h>
@@ -39,13 +47,12 @@ extern "C" {
}
#else
#include <crypt.h>
#include <shadow.h>
#endif
-#include "loginapplication.h"
LoginApplication *lApp;
LoginApplication::LoginApplication ( int &argc, char **argv, pid_t parentpid )
: QPEApplication ( argc, argv, GuiServer )
{
@@ -159,13 +166,13 @@ bool LoginApplication::changeIdentity ( )
struct passwd *pw = ::getpwnam ( s_username );
if ( !pw )
return false;
// we are still root at this point - try to run the pre-session script
if ( !runRootScript ( "OPIEDIR", "share/opie-login/pre-session", s_username ))
- qWarning ( "failed to run $OPIEDIR/share/opie-login/pre-session" );
+ owarn << "failed to run $OPIEDIR/share/opie-login/pre-session" << oendl;
bool fail = false;
fail |= ( ::initgroups ( pw-> pw_name, pw-> pw_gid ));
::endgrent ( );
fail |= ( ::setgid ( pw-> pw_gid ));
fail |= ( ::setuid ( pw-> pw_uid ));
@@ -184,21 +191,21 @@ bool LoginApplication::changeIdentity ( )
bool LoginApplication::login ( )
{
execUserScript ( "HOME", ".opie-session" );
execUserScript ( "OPIEDIR", "share/opie-login/opie-session" );
execUserScript ( "OPIEDIR", "bin/qpe" );
- qWarning ( "failed to start an Opie session" );
+ owarn << "failed to start an Opie session" << oendl;
return false;
}
void LoginApplication::logout ( )
{
// we are now root again - try to run the post-session script
if ( !runRootScript ( "OPIEDIR", "share/opie-login/post-session" ))
- qWarning ( "failed to run $OPIEDIR/scripts/post-session" );
+ owarn << "failed to run $OPIEDIR/scripts/post-session" << oendl;
}
static char *buildarg ( const char *base, const char *script )
{
const char *dir = base ? ::getenv ( base ) : "/";
diff --git a/core/pim/addressbook/namelineedit.cpp b/core/pim/addressbook/namelineedit.cpp
index ba16e2c..81b959b 100644
--- a/core/pim/addressbook/namelineedit.cpp
+++ b/core/pim/addressbook/namelineedit.cpp
@@ -1,8 +1,12 @@
#include "namelineedit.h"
+/* OPIE */
+#include <opie2/odebug.h>
+
+
namespace ABOOK {
NameLineEdit::NameLineEdit( QWidget* parent, const char* name )
: QLineEdit( parent, name ), m_prevSpace( true ) {
}
NameLineEdit::NameLineEdit( const QString& str, QWidget* par,
@@ -19,13 +23,13 @@ void NameLineEdit::keyPressEvent( QKeyEvent* ev ) {
int ascii = ev->ascii();
// ### FIXME with composed events
if ( !t.isEmpty() && ( !ev->ascii() || ev->ascii()>=32 ) &&
key != Key_Delete && key != Key_Backspace &&
key != Key_Return && key != Key_Enter ) {
- qWarning( "str " + ev->text() + " %d", m_prevSpace );
+ owarn << "str " << ev->text() << " " << m_prevSpace << oendl;
if ( m_prevSpace ) {
t = t.upper();
m_prevSpace = false;
}
if ( key == Key_Space )
diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp
index 777c384..7bf6719 100644
--- a/core/qws/transferserver.cpp
+++ b/core/qws/transferserver.cpp
@@ -18,12 +18,13 @@
**
**********************************************************************/
/* OPIE */
#include <opie2/odebug.h>
+/* STD */
#define _XOPEN_SOURCE
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
@@ -1124,15 +1125,14 @@ void ServerDTP::connected()
createTargzProc->kill();
}
bytes_written = 0;
odebug << "==>start send tar process" << oendl;
if ( !createTargzProc->start(Opie::Core::OProcess::NotifyOnExit, Opie::Core::OProcess::Stdout) )
- qWarning("Error starting %s or %s",
- createTargzProc->args()[0].data(),
- gzipProc->args()[0].data());
+ owarn << "Error starting " << createTargzProc->args()[0].data()
+ << " or " << gzipProc->args()[0].data() << oendl;
break;
case SendBuffer:
if ( !buf.open( IO_ReadOnly) ) {
emit failed();
mode = Idle;
return ;