summaryrefslogtreecommitdiff
path: root/core
authorar <ar>2004-05-02 16:22:24 (UTC)
committer ar <ar>2004-05-02 16:22:24 (UTC)
commit34f1234b010fa80f9ca06e65f46130713f7362d9 (patch) (side-by-side diff)
tree6ded6dcd83ed00b436f312f2403f7afc9f399435 /core
parent4e7ab937501b6495ce5635a7515e66a75e04d37e (diff)
downloadopie-34f1234b010fa80f9ca06e65f46130713f7362d9.zip
opie-34f1234b010fa80f9ca06e65f46130713f7362d9.tar.gz
opie-34f1234b010fa80f9ca06e65f46130713f7362d9.tar.bz2
- convert qDebug to odebug
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEScreen.cpp2
-rw-r--r--core/apps/embeddedkonsole/TEWidget.cpp6
-rw-r--r--core/apps/embeddedkonsole/commandeditdialog.cpp4
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp41
-rw-r--r--core/apps/embeddedkonsole/main.cpp8
-rw-r--r--core/apps/embeddedkonsole/playlistselection.cpp11
6 files changed, 38 insertions, 34 deletions
diff --git a/core/apps/embeddedkonsole/TEScreen.cpp b/core/apps/embeddedkonsole/TEScreen.cpp
index 3dbcec2..8e69a88 100644
--- a/core/apps/embeddedkonsole/TEScreen.cpp
+++ b/core/apps/embeddedkonsole/TEScreen.cpp
@@ -66,13 +66,13 @@
*/
TEScreen::TEScreen(int lines, int columns)
{
this->lines = lines;
this->columns = columns;
-// qDebug("Columns %d", columns);
+// odebug << "Columns " << columns << "" << oendl;
image = (ca*) malloc(lines*columns*sizeof(ca));
tabstops = NULL; initTabStops();
histCursor = 0;
horzCursor = 0;
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp
index 93348f4..3cb1c0a 100644
--- a/core/apps/embeddedkonsole/TEWidget.cpp
+++ b/core/apps/embeddedkonsole/TEWidget.cpp
@@ -938,13 +938,13 @@ void TEWidget::setMouseMarks(bool on)
void TEWidget::emitSelection()
// Paste Clipboard by simulating keypress events
{
#ifndef QT_NO_CLIPBOARD
QString text = QApplication::clipboard()->text();
-// qDebug(text);
+// odebug << text << oendl;
if ( ! text.isNull())
{
text.replace(QRegExp("\n"), "\r");
QKeyEvent e(QEvent::KeyPress, 0, -1, 0, text);
emit keyPressedSignal(&e); // expose as a big fat keypress event
emit clearSelectionSignal();
@@ -1025,13 +1025,13 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e )
QApplication::sendEvent(scrollbar, e);
}
#ifdef FAKE_CTRL_AND_ALT
static bool control = FALSE;
static bool alt = FALSE;
-// qDebug(" Has a keyboard with no CTRL and ALT keys, but we fake it:");
+// odebug << " Has a keyboard with no CTRL and ALT keys, but we fake it:" << oendl;
bool dele=FALSE;
if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) {
QKeyEvent* ke = (QKeyEvent*)e;
bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat();
switch (ke->key()) {
case Key_F9: // let this be "Control"
@@ -1064,13 +1064,13 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e )
if ( e->type() == QEvent::KeyPress ) {
QKeyEvent* ke = (QKeyEvent*)e;
actSel=0; // Key stroke implies a screen update, so TEWidget won't
// know where the current selection is.
-// qDebug("key pressed is 0x%x, ascii is 0x%x, state %d", ke->key(), ke->ascii(), ke->state());
+// odebug << "key pressed is 0x" << ke->key() << ", ascii is 0x" << ke->ascii() << ", state " << ke->state() << "" << oendl;
bool special_function = true;
switch(ke->key()) {
// case 0x201b: // fn-5
// case Key_F1:
// switch sessions (?)
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp
index 6587b26..697bf72 100644
--- a/core/apps/embeddedkonsole/commandeditdialog.cpp
+++ b/core/apps/embeddedkonsole/commandeditdialog.cpp
@@ -148,19 +148,19 @@ int i = 0;
cfg->setGroup("Commands");
cfg->clearGroup();
QListViewItemIterator it( m_PlayListSelection );
for ( ; it.current(); ++it ) {
-// qDebug(it.current()->text(0));
+// odebug << it.current()->text(0) << oendl;
cfg->writeEntry(QString::number(i),it.current()->text(0));
i++;
}
cfg->writeEntry("Commands Set","TRUE");
-// qDebug("CommandEditDialog::accept() - written");
+// odebug << "CommandEditDialog::accept() - written" << oendl;
delete cfg;
emit commandsEdited();
close();
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 8207f23..80c8223 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -26,12 +26,13 @@
#include <sys/types.h>
#include <pwd.h>
#include <unistd.h>
#ifdef QT_QWS_OPIE
#include <opie2/ocolorpopupmenu.h>
+#include <opie2/odebug.h>
using namespace Opie;
#endif
#include <qpe/resource.h>
#include <qmenubar.h>
@@ -201,26 +202,26 @@ static const char *commonCmds[] =
"exit",
NULL
};
static void konsoleInit(const char** shell) {
- if(setuid(getuid()) !=0) qDebug("setuid failed");
- if(setgid(getgid()) != 0) qDebug("setgid failed"); // drop privileges
+ if(setuid(getuid()) !=0) odebug << "setuid failed" << oendl;
+ if(setgid(getgid()) != 0) odebug << "setgid failed" << oendl; // drop privileges
// QPEApplication::grabKeyboard(); // for CTRL and ALT
- qDebug("keyboard grabbed");
+ odebug << "keyboard grabbed" << oendl;
#ifdef FAKE_CTRL_AND_ALT
- qDebug("Fake Ctrl and Alt defined");
+ odebug << "Fake Ctrl and Alt defined" << oendl;
QPEApplication::grabKeyboard(); // for CTRL and ALT
#endif
*shell = getenv("SHELL");
- qWarning("SHell initially is %s", *shell );
+ owarn << "SHell initially is " << *shell << "" << oendl;
if (shell == NULL || *shell == '\0') {
struct passwd *ent = 0;
uid_t me = getuid();
*shell = "/bin/sh";
@@ -232,13 +233,13 @@ static void konsoleInit(const char** shell) {
}
}
endpwent();
}
if( putenv((char*)"COLORTERM=") !=0)
- qDebug("putenv failed"); // to trigger mc's color detection
+ odebug << "putenv failed" << oendl; // to trigger mc's color detection
}
Konsole::Konsole(QWidget* parent, const char* name, WFlags fl) :
QMainWindow(parent, name, fl)
{
@@ -278,13 +279,13 @@ class HistoryList : public QList<HistoryItem>
return(0);
}
};
void Konsole::initCommandList()
{
- // qDebug("Konsole::initCommandList");
+ // odebug << "Konsole::initCommandList" << oendl;
Config cfg( "Konsole" );
cfg.setGroup("Commands");
// commonCombo->setInsertionPolicy(QComboBox::AtCurrent);
commonCombo->clear();
if (cfg.readEntry("ShellHistory","TRUE") == "TRUE")
@@ -510,13 +511,13 @@ void Konsole::init(const char* _pgm, QStrList & _args)
QMenuBar *menuBar = new QMenuBar( menuToolBar );
setFont(cfont);
configMenu = new QPopupMenu( this);
- colorMenu = new QPopupMenu( this);
+ colorMenu = new QPopupMenu( this);
scrollMenu = new QPopupMenu( this);
editCommandListMenu = new QPopupMenu( this);
configMenu->insertItem(tr("Command List"), editCommandListMenu);
bool listHidden;
@@ -1064,13 +1065,13 @@ QSize Konsole::calcSize(int columns, int lines)
sets application window to a size based on columns X lines of the te
guest widget. Call with (0,0) for setting default size.
*/
void Konsole::setColLin(int columns, int lines)
{
- qDebug("konsole::setColLin:: Columns %d", columns);
+ odebug << "konsole::setColLin:: Columns " << columns << "" << oendl;
if ((columns==0) || (lines==0))
{
if (defaultSize.isEmpty()) // not in config file : set default value
{
defaultSize = calcSize(80,24);
@@ -1112,13 +1113,13 @@ void Konsole::setFont(int fontno)
*/
// --| color selection |-------------------------------------------------------
void Konsole::changeColumns(int /*columns*/)
{ //FIXME this seems to cause silliness when reset command is executed
- // qDebug("change columns");
+ // odebug << "change columns" << oendl;
// TEWidget* te = getTe();
// if (te != 0) {
// setColLin(columns,te->Lines());
// te->update();
// }
}
@@ -1410,13 +1411,13 @@ void Konsole::colorMenuIsSelected(int iD)
void Konsole::colorMenuSelected(int iD)
{
// this is NOT pretty, elegant or anything else besides functional
// QString temp;
- // qDebug( temp.sprintf("colormenu %d", iD));
+ // odebug << temp.sprintf("colormenu " << iD) << "" << oendl;
TEWidget* te = getTe();
Config cfg( "Konsole" );
cfg.setGroup("Colors");
ColorEntry m_table[TABLE_COLORS];
@@ -1526,13 +1527,13 @@ void Konsole::colorMenuSelected(int iD)
colorMenu->setItemChecked(cm_ab,TRUE);
}
#ifdef QT_QWS_OPIE
if(iD==-19)
{
// Custom
- qDebug("do custom");
+ odebug << "do custom" << oendl;
if(fromMenu)
{
Opie::OColorPopupMenu* penColorPopupMenu = new Opie::OColorPopupMenu(Qt::black, this, "foreground color");
connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this,
SLOT(changeForegroundColor(const QColor&)));
penColorPopupMenu->exec();
@@ -1631,13 +1632,13 @@ void Konsole::tabMenuSelected(int id)
}
void Konsole::configMenuSelected(int iD)
{
// QString temp;
- // qDebug( temp.sprintf("configmenu %d",iD));
+ // odebug << temp.sprintf("configmenu " << iD) << "" << oendl;
TEWidget* te = getTe();
Config cfg( "Konsole" );
cfg.setGroup("Menubar");
if(iD == cm_wrap)
{
@@ -1701,13 +1702,13 @@ void Konsole::setColor(int sess)
cfg.readNumEntry("backgroundBlue",0)));
setColors(foreground, background);
}
void Konsole::scrollMenuSelected(int index)
{
- // qDebug( "scrollbar menu %d",index);
+ // odebug << "scrollbar menu " << index << "" << oendl;
TEWidget* te = getTe();
Config cfg( "Konsole" );
cfg.setGroup("ScrollBar");
if(index == sm_none)
@@ -1745,13 +1746,13 @@ void Konsole::scrollMenuSelected(int index)
// }
// break;
void Konsole::editCommandListMenuSelected(int iD)
{
// QString temp;
- // qDebug( temp.sprintf("edit command list %d",iD));
+ // odebug << temp.sprintf("edit command list " << iD) << "" << oendl;
// FIXME: more cleanup needed here
TEWidget* te = getTe();
Config cfg( "Konsole" );
@@ -1786,13 +1787,13 @@ void Konsole::editCommandListMenuSelected(int iD)
}
}
}
if( iD == ec_quick)
{
cfg.setGroup("Commands");
- // qDebug("enableCommandEdit");
+ // odebug << "enableCommandEdit" << oendl;
if( !configMenu->isItemChecked(iD) )
{
commonCombo->setEditable( TRUE );
configMenu->setItemChecked(iD,TRUE);
commonCombo->setCurrentItem(0);
cfg.writeEntry("EditEnabled","TRUE");
@@ -1874,36 +1875,36 @@ void Konsole::changeForegroundColor(const QColor &color)
cfg.setGroup("Colors");
int r, g, b;
color.rgb(&r,&g,&b);
foreground.setRgb(r,g,b);
cfg.writeEntry("foreground",color.name());
- qDebug("foreground "+color.name());
+ odebug << "foreground "+color.name() << oendl;
cfg.write();
- qDebug("do other dialog");
+ odebug << "do other dialog" << oendl;
#ifdef QT_QWS_OPIE
Opie::OColorPopupMenu* penColorPopupMenu2 = new Opie::OColorPopupMenu(Qt::black, this,"background color");
connect(penColorPopupMenu2, SIGNAL(colorSelected(const QColor&)), this,
SLOT(changeBackgroundColor(const QColor&)));
penColorPopupMenu2->exec();
#endif
}
void Konsole::changeBackgroundColor(const QColor &color)
{
- qDebug("Change background");
+ odebug << "Change background" << oendl;
Config cfg( "Konsole" );
cfg.setGroup("Colors");
int r, g, b;
color.rgb(&r,&g,&b);
background.setRgb(r,g,b);
cfg.writeEntry("background",color.name());
- qDebug("background "+color.name());
+ odebug << "background "+color.name() << oendl;
cfg.write();
}
void Konsole::doWrap()
{
Config cfg( "Konsole" );
diff --git a/core/apps/embeddedkonsole/main.cpp b/core/apps/embeddedkonsole/main.cpp
index b851d3e..131e782 100644
--- a/core/apps/embeddedkonsole/main.cpp
+++ b/core/apps/embeddedkonsole/main.cpp
@@ -42,18 +42,18 @@ OPIE_EXPORT_APP( OApplicationFactory<Konsole> )
#include <pwd.h>
#include <sys/types.h>
/* --| main |------------------------------------------------------ */
int main(int argc, char* argv[]) {
- if(setuid(getuid()) !=0) qDebug("setuid failed");
- if(setgid(getgid()) != 0) qDebug("setgid failed"); // drop privileges
+ if(setuid(getuid()) !=0) odebug << "setuid failed" << oendl;
+ if(setgid(getgid()) != 0) odebug << "setgid failed" << oendl; // drop privileges
QPEApplication a( argc, argv );
#ifdef FAKE_CTRL_AND_ALT
- qDebug("Fake Ctrl and Alt defined");
+ odebug << "Fake Ctrl and Alt defined" << oendl;
QPEApplication::grabKeyboard(); // for CTRL and ALT
#endif
QStrList tmp;
const char* shell = getenv("SHELL");
@@ -70,13 +70,13 @@ OPIE_EXPORT_APP( OApplicationFactory<Konsole> )
}
}
endpwent();
}
if( putenv((char*)"COLORTERM=") !=0)
- qDebug("putenv failed"); // to trigger mc's color detection
+ odebug << "putenv failed" << oendl; // to trigger mc's color detection
Konsole m( "test", shell, tmp, TRUE );
m.setCaption( Konsole::tr("Terminal") );
a.showMainWidget( &m );
return a.exec();
diff --git a/core/apps/embeddedkonsole/playlistselection.cpp b/core/apps/embeddedkonsole/playlistselection.cpp
index fc5330f..096d36a 100644
--- a/core/apps/embeddedkonsole/playlistselection.cpp
+++ b/core/apps/embeddedkonsole/playlistselection.cpp
@@ -14,20 +14,23 @@
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
-#include <qheader.h>
#include "playlistselection.h"
-#include <stdlib.h>
-
+/* OPIE */
+#include <opie2/odebug.h>
+/* Qt */
+#include <qheader.h>
+/* STD */
+#include <stdlib.h>
PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
: QListView( parent, name )
{
setAllColumnsShowFocus( TRUE );
@@ -78,13 +81,13 @@ void PlayListSelection::addStringToSelection (const QString & lnk) {
item->moveItem( current );
setSelected( item, TRUE );
ensureItemVisible( selectedItem() );
}
void PlayListSelection::removeSelected() {
- qDebug("removeSelected()");
+ odebug << "removeSelected()" << oendl;
QListViewItem *item = selectedItem();
if ( item )
delete item;
setSelected( currentItem(), TRUE );
ensureItemVisible( selectedItem() );
}