summaryrefslogtreecommitdiffstats
path: root/konsole
diff options
context:
space:
mode:
Diffstat (limited to 'konsole')
-rw-r--r--konsole/konsole/TEWidget.cpp21
-rw-r--r--konsole/konsole/TEWidget.h5
-rw-r--r--konsole/konsole/TEmulation.cpp2
-rw-r--r--konsole/konsole/keytrans.cpp5
-rw-r--r--konsole/konsole/konsole.cpp38
-rw-r--r--konsole/konsole/konsole_part.cpp6
-rw-r--r--konsole/konsole/schema.h4
7 files changed, 47 insertions, 34 deletions
diff --git a/konsole/konsole/TEWidget.cpp b/konsole/konsole/TEWidget.cpp
index 6a97e46cd..fb0a64376 100644
--- a/konsole/konsole/TEWidget.cpp
+++ b/konsole/konsole/TEWidget.cpp
@@ -389,7 +389,7 @@ TEWidget::TEWidget(TQWidget *parent, const char *name)
// konsole in opaque mode.
bY = bX = 1;
- cb = TQApplication::clipboard();
+ cb = TQApplication::tqclipboard();
TQObject::connect( (TQObject*)cb, TQT_SIGNAL(selectionChanged()),
this, TQT_SLOT(onClearSelection()) );
@@ -562,7 +562,7 @@ void TEWidget::drawTextFixed(TQPainter &paint, int x, int y,
int w;
for(unsigned int i=0;i<str.length();i++)
{
- drawstr = str.at(i);
+ drawstr = str.tqat(i);
// Add double of the width if next c is 0;
if ((attr+nc+1)->c) // This may access image[image_size] See makeImage()
{
@@ -615,8 +615,13 @@ void TEWidget::drawAttrStr(TQPainter &paint, TQRect rect,
{
if (pm)
paint.setBackgroundMode( Qt::TransparentMode );
- if (clear || (blinking && (attr->r & RE_BLINK)))
+ if (clear || (blinking && (attr->r & RE_BLINK))) {
+#ifdef USE_QT4
+ paint.eraseRect(rect);
+#else // USE_QT4
erase(rect);
+#endif // USE_QT4
+ }
}
else
{
@@ -807,7 +812,7 @@ void TEWidget::setImage(const ca* const newimg, int lines, int columns)
int y,x,len;
const TQPixmap* pm = backgroundPixmap();
TQPainter paint;
- setUpdatesEnabled(false);
+ tqsetUpdatesEnabled(false);
paint.begin( this );
TQPoint tL = contentsRect().topLeft();
@@ -919,7 +924,7 @@ void TEWidget::setImage(const ca* const newimg, int lines, int columns)
}
drawFrame( &paint );
paint.end();
- setUpdatesEnabled(true);
+ tqsetUpdatesEnabled(true);
if ( hasBlinker && !blinkT->isActive()) blinkT->start(1000); // 1000 ms
if (!hasBlinker && blinkT->isActive()) { blinkT->stop(); blinking = false; }
free(dirtyMask);
@@ -986,7 +991,7 @@ void TEWidget::paintEvent( TQPaintEvent* pe )
{
const TQPixmap* pm = backgroundPixmap();
TQPainter paint;
- setUpdatesEnabled(false);
+ tqsetUpdatesEnabled(false);
paint.begin( this );
paint.setBackgroundMode( Qt::TransparentMode );
@@ -1044,7 +1049,7 @@ void TEWidget::paintEvent( TQPaintEvent* pe )
erase( er );
paint.end();
- setUpdatesEnabled(true);
+ tqsetUpdatesEnabled(true);
}
void TEWidget::print(TQPainter &paint, bool friendly, bool exact)
@@ -2261,7 +2266,7 @@ void TEWidget::dropEvent(TQDropEvent* event)
void TEWidget::doDrag()
{
dragInfo.state = diDragging;
- dragInfo.dragObject = new TQTextDrag(TQApplication::clipboard()->text(QClipboard::Selection), this);
+ dragInfo.dragObject = new TQTextDrag(TQApplication::tqclipboard()->text(TQClipboard::Selection), this);
dragInfo.dragObject->dragCopy();
// Don't delete the TQTextDrag object. Qt will delete it when it's done with it.
}
diff --git a/konsole/konsole/TEWidget.h b/konsole/konsole/TEWidget.h
index 514db41d5..afb1ff3a8 100644
--- a/konsole/konsole/TEWidget.h
+++ b/konsole/konsole/TEWidget.h
@@ -44,6 +44,7 @@ class TEWidget : public TQFrame
// a widget representing attributed text
{
Q_OBJECT
+ TQ_OBJECT
friend class Konsole;
public:
@@ -165,7 +166,7 @@ signals:
void endSelectionSignal(const bool preserve_line_breaks);
void isBusySelecting(bool);
void testIsSelected(const int x, const int y, bool &selected /* result */);
- void sendStringToEmu(const char*);
+ void sendStringToEmu(const char*);
protected:
@@ -265,7 +266,7 @@ private:
bool preserve_line_breaks;
bool column_selection_mode;
- QClipboard* cb;
+ TQClipboard* cb;
TQScrollBar* scrollbar;
int scrollLoc;
TQString word_characters;
diff --git a/konsole/konsole/TEmulation.cpp b/konsole/konsole/TEmulation.cpp
index e136c3c38..af779e0b8 100644
--- a/konsole/konsole/TEmulation.cpp
+++ b/konsole/konsole/TEmulation.cpp
@@ -392,7 +392,7 @@ void TEmulation::clearSelection() {
void TEmulation::copySelection() {
if (!connected) return;
TQString t = scr->getSelText(true);
- TQApplication::clipboard()->setText(t);
+ TQApplication::tqclipboard()->setText(t);
}
TQString TEmulation::getSelection() {
diff --git a/konsole/konsole/keytrans.cpp b/konsole/konsole/keytrans.cpp
index de35d49ff..bcf5228c7 100644
--- a/konsole/konsole/keytrans.cpp
+++ b/konsole/konsole/keytrans.cpp
@@ -360,7 +360,10 @@ void KeyTrans::readConfig()
TQCString txt =
#include "default.keytab.h"
;
- buf=TQT_TQIODEVICE(new TQBuffer(txt));
+ TQBuffer* newbuf;
+ newbuf = new TQBuffer();
+ newbuf->tqsetBufferFromCopy(txt);
+ buf=TQT_TQIODEVICE(newbuf);
}
else
{
diff --git a/konsole/konsole/konsole.cpp b/konsole/konsole/konsole.cpp
index 37f53bfb6..d55042671 100644
--- a/konsole/konsole/konsole.cpp
+++ b/konsole/konsole/konsole.cpp
@@ -1305,7 +1305,7 @@ void Konsole::slotTabContextMenu(TQWidget* _te, const TQPoint & pos)
if (!m_menuCreated)
makeGUI();
- m_contextMenuSession = sessions.at( tabwidget->indexOf( _te ) );
+ m_contextMenuSession = sessions.tqat( tabwidget->indexOf( _te ) );
m_tabDetachSession->setEnabled( tabwidget->count()>1 );
@@ -1376,12 +1376,12 @@ void Konsole::slotTabSetViewOptions(int mode)
for(int i = 0; i < tabwidget->count(); i++) {
TQWidget *page = tabwidget->page(i);
- TQIconSet icon = iconSetForSession(sessions.at(i));
+ TQIconSet icon = iconSetForSession(sessions.tqat(i));
TQString title;
if (b_matchTabWinTitle)
- title = sessions.at(i)->fullTitle();
+ title = sessions.tqat(i)->fullTitle();
else
- title = sessions.at(i)->Title();
+ title = sessions.tqat(i)->Title();
title=title.tqreplace('&',"&&");
switch(mode) {
@@ -1614,7 +1614,7 @@ void Konsole::readProperties(KConfig* config, const TQString &schema, bool globa
ColorSchema* sch = colors->find(schema.isEmpty() ? s_kconfigSchema : schema);
if (!sch)
{
- sch = (ColorSchema*)colors->at(0); //the default one
+ sch = (ColorSchema*)colors->tqat(0); //the default one
kdWarning() << "Could not find schema named " <<s_kconfigSchema<<"; using "<<sch->relPath()<<endl;
s_kconfigSchema = sch->relPath();
}
@@ -1872,7 +1872,7 @@ void Konsole::updateSchemaMenu()
m_schema->clear();
for (int i = 0; i < (int) colors->count(); i++)
{
- ColorSchema* s = (ColorSchema*)colors->at(i);
+ ColorSchema* s = (ColorSchema*)colors->tqat(i);
assert( s );
TQString title=s->title();
m_schema->insertItem(title.tqreplace('&',"&&"),s->numb(),0);
@@ -2115,7 +2115,7 @@ void Konsole::reparseConfiguration()
ColorSchema* sch = colors->find(s_kconfigSchema);
if (!sch)
{
- sch = (ColorSchema*)colors->at(0); //the default one
+ sch = (ColorSchema*)colors->tqat(0); //the default one
kdWarning() << "Could not find schema named " <<s_kconfigSchema<<"; using "<<sch->relPath()<<endl;
s_kconfigSchema = sch->relPath();
}
@@ -2486,7 +2486,7 @@ TQString Konsole::sessionId(const int position)
if (position<=0 || position>(int)sessions.count())
return "";
- return sessions.at(position-1)->SessionId();
+ return sessions.tqat(position-1)->SessionId();
}
void Konsole::listSessions()
@@ -2512,7 +2512,7 @@ void Konsole::activateSession(int position)
{
if (position<0 || position>=(int)sessions.count())
return;
- activateSession( sessions.at(position) );
+ activateSession( sessions.tqat(position) );
}
void Konsole::activateSession(TQWidget* w)
@@ -2572,7 +2572,7 @@ void Konsole::activateSession(TESession *s)
// Set the required schema variables for the current session
ColorSchema* cs = colors->find( se->schemaNo() );
if (!cs)
- cs = (ColorSchema*)colors->at(0); //the default one
+ cs = (ColorSchema*)colors->tqat(0); //the default one
s_schema = cs->relPath();
curr_schema = cs->numb();
pmPath = cs->imagePath();
@@ -2618,7 +2618,7 @@ void Konsole::activateSession(TESession *s)
if (monitorSilence) monitorSilence->setChecked( se->isMonitorSilence() );
masterMode->setChecked( se->isMasterMode() );
sessions.tqfind(se);
- uint position=sessions.at();
+ uint position=sessions.tqat();
if (m_moveSessionLeft) m_moveSessionLeft->setEnabled(position>0);
if (m_moveSessionRight) m_moveSessionRight->setEnabled(position<sessions.count()-1);
}
@@ -2857,7 +2857,7 @@ TQString Konsole::newSession(KSimpleConfig *co, TQString program, const TQStrLis
ColorSchema* schema = colors->find(sch);
if (!schema)
- schema=(ColorSchema*)colors->at(0); //the default one
+ schema=(ColorSchema*)colors->tqat(0); //the default one
int schmno = schema->numb();
if (sessions.count()==1 && n_tabbar!=TabNone)
@@ -3049,7 +3049,7 @@ void Konsole::doneSession(TESession* s)
se = 0;
if (sessions.count())
{
- se = sessions.at(sessionIndex ? sessionIndex - 1 : 0);
+ se = sessions.tqat(sessionIndex ? sessionIndex - 1 : 0);
session2action.tqfind(se)->setChecked(true);
//FIXME: this Timer stupidity originated from the connected
@@ -3067,7 +3067,7 @@ void Konsole::doneSession(TESession* s)
}
else {
sessions.tqfind(se);
- uint position=sessions.at();
+ uint position=sessions.tqat();
m_moveSessionLeft->setEnabled(position>0);
m_moveSessionRight->setEnabled(position<sessions.count()-1);
}
@@ -3121,7 +3121,7 @@ void Konsole::slotMovedTab(int from, int to)
void Konsole::moveSessionLeft()
{
sessions.tqfind(se);
- uint position=sessions.at();
+ uint position=sessions.tqat();
if (position==0)
return;
@@ -3153,7 +3153,7 @@ void Konsole::moveSessionLeft()
void Konsole::moveSessionRight()
{
sessions.tqfind(se);
- uint position=sessions.at();
+ uint position=sessions.tqat();
if (position==sessions.count()-1)
return;
@@ -3556,7 +3556,7 @@ void Konsole::setSchema(int numb, TEWidget* tewidget)
ColorSchema* s = colors->find(numb);
if (!s)
{
- s = (ColorSchema*)colors->at(0);
+ s = (ColorSchema*)colors->tqat(0);
kdWarning() << "No schema with serial #"<<numb<<", using "<<s->relPath()<<" (#"<<s->numb()<<")." << endl;
s_kconfigSchema = s->relPath();
}
@@ -3573,7 +3573,7 @@ void Konsole::setSchema(const TQString & path)
ColorSchema* s = colors->find(path);
if (!s)
{
- s = (ColorSchema*)colors->at(0); //the default one
+ s = (ColorSchema*)colors->tqat(0); //the default one
kdWarning() << "No schema with the name " <<path<<", using "<<s->relPath()<<endl;
s_kconfigSchema = s->relPath();
}
@@ -3704,7 +3704,7 @@ void Konsole::detachSession(TESession* _se) {
if (se_previous)
se = se_previous;
else
- se = sessions.at(sessionIndex ? sessionIndex - 1 : 0);
+ se = sessions.tqat(sessionIndex ? sessionIndex - 1 : 0);
session2action.tqfind(se)->setChecked(true);
TQTimer::singleShot(1,this,TQT_SLOT(activateSession()));
}
diff --git a/konsole/konsole/konsole_part.cpp b/konsole/konsole/konsole_part.cpp
index d4b1d4627..a2594edc1 100644
--- a/konsole/konsole/konsole_part.cpp
+++ b/konsole/konsole/konsole_part.cpp
@@ -577,7 +577,7 @@ void konsolePart::readProperties()
s_kconfigSchema=config->readEntry("schema");
ColorSchema* sch = colors->find(schema.isEmpty() ? s_kconfigSchema : schema);
if (!sch) {
- sch=(ColorSchema*)colors->at(0); //the default one
+ sch=(ColorSchema*)colors->tqat(0); //the default one
}
if (sch->hasSchemaFileChanged()) sch->rereadSchemaFile();
s_schema = sch->relPath();
@@ -731,7 +731,7 @@ void konsolePart::updateSchemaMenu()
m_schema->clear();
for (int i = 0; i < (int) colors->count(); i++) {
- ColorSchema* s = (ColorSchema*)colors->at(i);
+ ColorSchema* s = (ColorSchema*)colors->tqat(i);
TQString title=s->title();
m_schema->insertItem(title.tqreplace('&',"&&"),s->numb(),0);
}
@@ -746,7 +746,7 @@ void konsolePart::setSchema(int numb)
ColorSchema* s = colors->find(numb);
if (!s) {
kdWarning() << "No schema found. Using default." << endl;
- s=(ColorSchema*)colors->at(0);
+ s=(ColorSchema*)colors->tqat(0);
}
if (s->numb() != numb) {
kdWarning() << "No schema with number " << numb << endl;
diff --git a/konsole/konsole/schema.h b/konsole/konsole/schema.h
index 0a1fb4cc1..de48e3cbd 100644
--- a/konsole/konsole/schema.h
+++ b/konsole/konsole/schema.h
@@ -187,6 +187,10 @@ public:
uint count() const { return TQPtrList<ColorSchema>::count(); } ;
const ColorSchema *at(unsigned int i)
{ return TQPtrList<ColorSchema>::at(i); } ;
+#ifdef USE_QT4
+ const ColorSchema *tqat(unsigned int i)
+ { return at(i); ;
+#endif // USE_QT4
void sort() {TQPtrList<ColorSchema>::sort();};