Browse Source

Rename KComp to avoid conflicts with KDE4

tags/r14.0.0
Timothy Pearson 6 years ago
parent
commit
563c545850

+ 3
- 3
kdesktop/minicli.cpp View File

@@ -243,7 +243,7 @@ void Minicli::loadConfig()
int mode = KDesktopSettings::completionMode();
m_dlg->cbCommand->setCompletionMode( (TDEGlobalSettings::Completion) mode );

KCompletionBox* box = m_dlg->cbCommand->completionBox();
TDECompletionBox* box = m_dlg->cbCommand->completionBox();
if (box)
box->setActivateOnSelect( false );

@@ -263,8 +263,8 @@ void Minicli::loadConfig()
users << TQString::fromLocal8Bit(pw->pw_name);
endpwent();

KCompletion *completion = new KCompletion;
completion->setOrder(KCompletion::Sorted);
TDECompletion *completion = new TDECompletion;
completion->setOrder(TDECompletion::Sorted);
completion->insertItems (users);

m_dlg->leUsername->setCompletionObject(completion, true);

+ 1
- 1
kicker/kicker/ui/exe_dlg.cpp View File

@@ -127,7 +127,7 @@ void PanelExeDialog::updateIcon()

void PanelExeDialog::fillCompletion()
{
KCompletion *comp = ui->m_exec->completionObject();
TDECompletion *comp = ui->m_exec->completionObject();
TQStringList exePaths = TDEStandardDirs::systemPaths();

for (TQStringList::ConstIterator it = exePaths.begin(); it != exePaths.end(); it++)

+ 1
- 1
kicker/kicker/ui/k_new_mnu.cpp View File

@@ -1227,7 +1227,7 @@ void KMenu::initialize()
else
m_kcommand->completionObject()->setItems( compList );

KCompletionBox* box = m_kcommand->completionBox();
TDECompletionBox* box = m_kcommand->completionBox();
if (box)
box->setActivateOnSelect( false );


+ 1
- 1
konqueror/ChangeLog View File

@@ -270,7 +270,7 @@
Sat Nov 25 17:38:27 2000 Carsten Pfeiffer <pfeiffer@kde.org>

* konq_mainwindow.cc: Completion handling overhauled. We have
one KonqHistoryManager, which holds a KCompletion object and syncs
one KonqHistoryManager, which holds a TDECompletion object and syncs
the history with the completion.

* konq_view.cc:

+ 6
- 6
konqueror/konq_combo.cc View File

@@ -83,7 +83,7 @@ public:
void setCompletedItems( const TQStringList& items );
};

class KonqComboCompletionBox : public KCompletionBox
class KonqComboCompletionBox : public TDECompletionBox
{
public:
KonqComboCompletionBox( TQWidget *parent, const char *name = 0 );
@@ -108,7 +108,7 @@ KonqCombo::KonqCombo( TQWidget *parent, const char *name )

// We should also connect the completionBox' highlighted signal to
// our setEditText() slot, because we're handling the signals ourselves.
// But we're lazy and let KCompletionBox do this and simply switch off
// But we're lazy and let TDECompletionBox do this and simply switch off
// handling of signals later.
setHandleSignals( true );

@@ -139,7 +139,7 @@ KonqCombo::~KonqCombo()
{
}

void KonqCombo::init( KCompletion *completion )
void KonqCombo::init( TDECompletion *completion )
{
setCompletionObject( completion, false ); //KonqMainWindow handles signals
setAutoDeleteCompletionObject( false );
@@ -838,7 +838,7 @@ void KonqComboLineEdit::setCompletedItems( const TQStringList& items )
///////////////////////////////////////////////////////////////////////////////

KonqComboCompletionBox::KonqComboCompletionBox( TQWidget *parent, const char *name )
:KCompletionBox( parent, name ) {}
:TDECompletionBox( parent, name ) {}

void KonqComboCompletionBox::setItems( const TQStringList& items )
{
@@ -889,9 +889,9 @@ void KonqComboCompletionBox::setItems( const TQStringList& items )

blockSignals( block );

// Trigger d->down_workaround = true within KCompletionBox
// Trigger d->down_workaround = true within TDECompletionBox
TQStringList dummy;
KCompletionBox::insertItems( dummy, 1 );
TDECompletionBox::insertItems( dummy, 1 );
}

void KonqComboCompletionBox::insertStringList( const TQStringList & list, int index )

+ 2
- 2
konqueror/konq_combo.h View File

@@ -25,7 +25,7 @@
#include <kcombobox.h>
#include <konq_historymgr.h>

class KCompletion;
class TDECompletion;
class TDEConfig;

// we use KHistoryCombo _only_ for the up/down keyboard handling, otherwise
@@ -39,7 +39,7 @@ public:
~KonqCombo();

// initializes with the completion object and calls loadItems()
void init( KCompletion * );
void init( TDECompletion * );

// determines internally if it's temporary or final
void setURL( const TQString& url );

+ 16
- 16
konqueror/konq_mainwindow.cc View File

@@ -123,7 +123,7 @@ template class TQPtrList<TDEToggleAction>;

TQPtrList<KonqMainWindow> *KonqMainWindow::s_lstViews = 0;
TDEConfig * KonqMainWindow::s_comboConfig = 0;
KCompletion * KonqMainWindow::s_pCompletion = 0;
TDECompletion * KonqMainWindow::s_pCompletion = 0;
TQFile * KonqMainWindow::s_crashlog_file = 0;
bool KonqMainWindow::s_preloaded = false;
KonqMainWindow* KonqMainWindow::s_preloadedWindow = 0;
@@ -3287,8 +3287,8 @@ void KonqMainWindow::initCombo()
TQT_SLOT( slotMakeCompletion( const TQString& )));
connect( m_combo, TQT_SIGNAL( substringCompletion( const TQString& )),
TQT_SLOT( slotSubstringcompletion( const TQString& )));
connect( m_combo, TQT_SIGNAL( textRotation( KCompletionBase::KeyBindingType) ),
TQT_SLOT( slotRotation( KCompletionBase::KeyBindingType )));
connect( m_combo, TQT_SIGNAL( textRotation( TDECompletionBase::KeyBindingType) ),
TQT_SLOT( slotRotation( TDECompletionBase::KeyBindingType )));
connect( m_combo, TQT_SIGNAL( cleared() ),
TQT_SLOT ( slotClearHistory() ) );
connect( m_pURLCompletion, TQT_SIGNAL( match(const TQString&) ),
@@ -3382,17 +3382,17 @@ void KonqMainWindow::slotSubstringcompletion( const TQString& text )
m_combo->setCompletedItems( items );
}

void KonqMainWindow::slotRotation( KCompletionBase::KeyBindingType type )
void KonqMainWindow::slotRotation( TDECompletionBase::KeyBindingType type )
{
// Tell slotMatch() to do nothing
m_urlCompletionStarted = false;

bool prev = (type == KCompletionBase::PrevCompletionMatch);
if ( prev || type == KCompletionBase::NextCompletionMatch ) {
bool prev = (type == TDECompletionBase::PrevCompletionMatch);
if ( prev || type == TDECompletionBase::NextCompletionMatch ) {
TQString completion = prev ? m_pURLCompletion->previousMatch() :
m_pURLCompletion->nextMatch();

if( completion.isNull() ) { // try the history KCompletion object
if( completion.isNull() ) { // try the history TDECompletion object
completion = prev ? s_pCompletion->previousMatch() :
s_pCompletion->nextMatch();
}
@@ -5550,10 +5550,10 @@ static TQString hp_tryPrepend( const TQString& s )
}


static void hp_removeDupe( KCompletionMatches& l, const TQString& dupe,
KCompletionMatches::Iterator it_orig )
static void hp_removeDupe( TDECompletionMatches& l, const TQString& dupe,
TDECompletionMatches::Iterator it_orig )
{
for( KCompletionMatches::Iterator it = l.begin();
for( TDECompletionMatches::Iterator it = l.begin();
it != l.end();
) {
if( it == it_orig ) {
@@ -5572,14 +5572,14 @@ static void hp_removeDupe( KCompletionMatches& l, const TQString& dupe,
// remove duplicates like 'http://www.kde.org' and 'http://www.kde.org/'
// (i.e. the trailing slash)
// some duplicates are also created by prepending protocols
static void hp_removeDuplicates( KCompletionMatches& l )
static void hp_removeDuplicates( TDECompletionMatches& l )
{
TQString http = "http://";
TQString ftp = "ftp://ftp.";
TQString file = "file:";
TQString file2 = "file://";
l.removeDuplicates();
for( KCompletionMatches::Iterator it = l.begin();
for( TDECompletionMatches::Iterator it = l.begin();
it != l.end();
++it ) {
TQString str = (*it).value();
@@ -5602,9 +5602,9 @@ static void hp_removeDuplicates( KCompletionMatches& l )
}
}

static void hp_removeCommonPrefix( KCompletionMatches& l, const TQString& prefix )
static void hp_removeCommonPrefix( TDECompletionMatches& l, const TQString& prefix )
{
for( KCompletionMatches::Iterator it = l.begin();
for( TDECompletionMatches::Iterator it = l.begin();
it != l.end();
) {
if( (*it).value().startsWith( prefix )) {
@@ -5617,7 +5617,7 @@ static void hp_removeCommonPrefix( KCompletionMatches& l, const TQString& prefix

// don't include common prefixes like 'http://', i.e. when s == 'h', include
// http://hotmail.com but don't include everything just starting with 'http://'
static void hp_checkCommonPrefixes( KCompletionMatches& matches, const TQString& s )
static void hp_checkCommonPrefixes( TDECompletionMatches& matches, const TQString& s )
{
static const char* const prefixes[] = {
"http://",
@@ -5652,7 +5652,7 @@ TQStringList KonqMainWindow::historyPopupCompletionItems( const TQString& s)
const TQString file2 = "file://";
if( s.isEmpty())
return TQStringList();
KCompletionMatches matches= s_pCompletion->allWeightedMatches( s );
TDECompletionMatches matches= s_pCompletion->allWeightedMatches( s );
hp_checkCommonPrefixes( matches, s );
bool checkDuplicates = false;
if ( !s.startsWith( ftp ) ) {

+ 2
- 2
konqueror/konq_mainwindow.h View File

@@ -494,7 +494,7 @@ protected slots:
void slotCompletionModeChanged( TDEGlobalSettings::Completion );
void slotMakeCompletion( const TQString& );
void slotSubstringcompletion( const TQString& );
void slotRotation( KCompletionBase::KeyBindingType );
void slotRotation( TDECompletionBase::KeyBindingType );
void slotMatch( const TQString& );
void slotClearHistory();
void slotClearComboHistory();
@@ -730,7 +730,7 @@ private:
static TDEConfig *s_comboConfig;
KURLCompletion *m_pURLCompletion;
// just a reference to KonqHistoryManager's completionObject
static KCompletion *s_pCompletion;
static TDECompletion *s_pCompletion;

ToggleViewGUIClient *m_toggleViewGUIClient;


+ 4
- 4
libkonq/konq_historymgr.cc View File

@@ -55,8 +55,8 @@ KonqHistoryManager::KonqHistoryManager( TQObject *parent, const char *name )


// take care of the completion object
m_pCompletion = new KCompletion;
m_pCompletion->setOrder( KCompletion::Weighted );
m_pCompletion = new TDECompletion;
m_pCompletion->setOrder( TDECompletion::Weighted );

// and load the history
loadHistory();
@@ -619,10 +619,10 @@ bool KonqHistoryManager::loadFallback()

// tries to create a small KonqHistoryEntry out of a string, where the string
// looks like "http://www.bla.com/bla.html:23"
// the attached :23 is the weighting from KCompletion
// the attached :23 is the weighting from TDECompletion
KonqHistoryEntry * KonqHistoryManager::createFallbackEntry(const TQString& item) const
{
// code taken from KCompletion::addItem(), adjusted to use weight = 1
// code taken from TDECompletion::addItem(), adjusted to use weight = 1
uint len = item.length();
uint weight = 1;


+ 5
- 5
libkonq/konq_historymgr.h View File

@@ -37,7 +37,7 @@

#include <libkonq_export.h>

class KCompletion;
class TDECompletion;


typedef TQPtrList<KonqHistoryEntry> KonqBaseHistoryList;
@@ -69,7 +69,7 @@ protected:
* Konqueror instance. Additionally it synchronizes the history with other
* Konqueror instances via DCOP to keep one global and persistant history.
*
* It keeps the history in sync with one KCompletion object
* It keeps the history in sync with one TDECompletion object
*/
class LIBKONQ_EXPORT KonqHistoryManager : public KParts::HistoryProvider,
public KonqHistoryComm
@@ -164,9 +164,9 @@ public:
void removePending( const KURL& url );

/**
* @returns the KCompletion object.
* @returns the TDECompletion object.
*/
KCompletion * completionObject() const { return m_pCompletion; }
TDECompletion * completionObject() const { return m_pCompletion; }

/**
* @returns the list of all history entries, sorted by date
@@ -370,7 +370,7 @@ private:
TQ_UINT32 m_maxCount; // maximum of history entries
TQ_UINT32 m_maxAgeDays; // maximum age of a history entry

KCompletion *m_pCompletion; // the completion object we sync with
TDECompletion *m_pCompletion; // the completion object we sync with

/**
* A timer that will emit the KParts::HistoryProvider::updated() signal

+ 1
- 1
tdmlib/kgreet_classic.cpp View File

@@ -176,7 +176,7 @@ KClassicGreeter::~KClassicGreeter()
void // virtual
KClassicGreeter::loadUsers( const TQStringList &users )
{
KCompletion *userNamesCompletion = new KCompletion;
TDECompletion *userNamesCompletion = new TDECompletion;
userNamesCompletion->setItems( users );
loginEdit->setCompletionObject( userNamesCompletion );
loginEdit->setAutoDeleteCompletionObject( true );

+ 1
- 1
tdmlib/kgreet_pam.cpp View File

@@ -219,7 +219,7 @@ KPamGreeter::~KPamGreeter()
void // virtual
KPamGreeter::loadUsers( const TQStringList &users )
{
KCompletion *userNamesCompletion = new KCompletion;
TDECompletion *userNamesCompletion = new TDECompletion;
userNamesCompletion->setItems( users );
loginEdit->setCompletionObject( userNamesCompletion );
loginEdit->setAutoDeleteCompletionObject( true );

+ 1
- 1
tdmlib/kgreet_winbind.cpp View File

@@ -243,7 +243,7 @@ void // virtual
KWinbindGreeter::loadUsers( const TQStringList &users )
{
allUsers = users;
KCompletion *userNamesCompletion = new KCompletion;
TDECompletion *userNamesCompletion = new TDECompletion;
loginEdit->setCompletionObject( userNamesCompletion );
loginEdit->setAutoDeleteCompletionObject( true );
loginEdit->setCompletionMode( TDEGlobalSettings::CompletionAuto );

Loading…
Cancel
Save