Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent bdeb717137
commit 95e28f5bca

@ -1978,7 +1978,7 @@
* qeditor: Added emacs-style indent mode
2002-05-25 Harald Fernengel <harry@tdevelop.org>
* use KApplicationTree in tools-part to avoid code duplication
* use TDEApplicationTree in tools-part to avoid code duplication
2002-05-21 Roberto Raggi <raggi@cli.di.unipi.it>
* qeditor: Implemented markinterface

@ -680,7 +680,7 @@ void TrollProjectWidget::slotExecuteTarget()
m_part->appFrontend()->stopApplication();
while(m_part->appFrontend()->isRunning())
{
KApplication::kApplication()->processEvents();
TDEApplication::kApplication()->processEvents();
usleep(100);
}
}
@ -2062,7 +2062,7 @@ void TrollProjectWidget::slotExecuteProject()
m_part->appFrontend()->stopApplication();
while(m_part->appFrontend()->isRunning())
{
KApplication::kApplication()->processEvents();
TDEApplication::kApplication()->processEvents();
usleep(100);
}
}

@ -571,7 +571,7 @@ done. As an example, we'll discuss the changed version of the Qt example from ab
int main( int argc, char **argv )
{
KApplication a( argc, argv );
TDEApplication a( argc, argv );
QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );
@ -586,9 +586,9 @@ return a.exec();
</programlisting>
</para>
<para>
You see that first we have changed from <classname>QApplication</classname> to <classname>KApplication
You see that first we have changed from <classname>QApplication</classname> to <classname>TDEApplication
</classname>. Further, we had to change the previously used <methodname>setMainWidget()</methodname> method
to <methodname>setTopWidget</methodname>, which <classname>KApplication</classname> uses to set the main
to <methodname>setTopWidget</methodname>, which <classname>TDEApplication</classname> uses to set the main
widget. That's it! Your first KDE application is ready - you only have to tell the compiler the KDE
include path and the linker to link in the tdecore library with -ltdecore.
</para>
@ -601,10 +601,10 @@ mentioned before and see the effects.
<para>
What you should have looked into additionally until now is the reference documentation for Qt,
especially the <classname>QApplication</classname>, <classname>QWidget</classname> and <classname>QObject
</classname> class and the tdecore library documentation for the <classname>KApplication</classname> class.
</classname> class and the tdecore library documentation for the <classname>TDEApplication</classname> class.
The <ulink url="developer.kde.org/documentation/library/libraryref.html">KDE Library Reference handbook</ulink>
also covers a complete description about the invocation of the <classname>QApplication</classname> and
<classname>KApplication</classname> constructors including command-line argument processing.
<classname>TDEApplication</classname> constructors including command-line argument processing.
</para>
</sect2>
</sect1>
@ -861,7 +861,7 @@ by selecting the "Global Functions" folder.
5 about.addAuthor( "Your Name", 0, "you@you.com" );
6 KCmdLineArgs::init(argc, argv, &amp;about);
7 KCmdLineArgs::addCmdLineOptions(options);
8 KApplication app;
8 TDEApplication app;
9
10 // register ourselves as a dcop client
11 app.dcopClient()->registerAs(app.name(), false);
@ -896,7 +896,7 @@ by selecting the "Global Functions" folder.
</programlisting>
</para>
<para>
Now, what happens first is the usual creation of a <classname>KApplication</classname> object, but we've
Now, what happens first is the usual creation of a <classname>TDEApplication</classname> object, but we've
added some KDE methods that set program and author information for this application.
</para>
</sect2>

@ -109,7 +109,7 @@ Core application skeleton - classes needed by almost every application.
<itemizedlist>
<listitem><formalpara>
<title><ulink url="kdeapi:tdecore/KApplication">KApplication</ulink></title>
<title><ulink url="kdeapi:tdecore/TDEApplication">TDEApplication</ulink></title>
<para>
Initializes and controls a KDE application.
</para>
@ -1809,7 +1809,7 @@ action->setWhatsThis(i18n("Deletes the marked file"))
<para>
The invocation of <application>KHelpCenter</application> is encapsulated in the
<ulink url="kdeapi:tdecore/KApplication">KApplication</ulink>
<ulink url="kdeapi:tdecore/TDEApplication">TDEApplication</ulink>
class. In order to show the manual of your application, just use
</para>
@ -2091,8 +2091,8 @@ name. As additional properties, it contains two lines:
<literal>X-DCOP-ServiceType</literal> specifies the way the service is
started. The value <literal>Unique</literal> says that the service must not be
started more than once. This means, if you try to start this service (e.g. via
<ulink url="kdeapi:tdecore/KApplication.html#startServiceByName">
KApplication::startServiceByName()</ulink>, KDE looks whether it is already
<ulink url="kdeapi:tdecore/TDEApplication.html#startServiceByName">
TDEApplication::startServiceByName()</ulink>, KDE looks whether it is already
registered with DCOP and uses the running service. If it is not registered yet,
KDE will start it up and wait until is registered. Thus, you can immediately
send DCOP calls to the service. In such a case, the service should be implemented
@ -2134,7 +2134,7 @@ X-TDE-StartupNotify=false
<title>Using DCOP services</title>
<para>
A DCOP service is started with one of several methods in the KApplication
A DCOP service is started with one of several methods in the TDEApplication
class:
</para>
@ -2143,7 +2143,7 @@ DCOPClient *client = kapp->dcopClient();
client->attach();
if (!client->isApplicationRegistered("kio_uiserver")) {
QString error;
if (KApplication::startServiceByName("kio_uiserver", QStringList(), &amp;error))
if (TDEApplication::startServiceByName("kio_uiserver", QStringList(), &amp;error))
cout &lt;&lt; "Starting kioserver failed with message " &lt;&lt; error &lt;&lt; endl;
}
...
@ -2165,10 +2165,10 @@ instead, because it is much simpler and less error prone.
<para>
In the example given here, the service was started "by name", i.e. the
first argument to <function>KApplication::startServiceByName()</function> is
first argument to <function>TDEApplication::startServiceByName()</function> is
the name is appearing in the <literal>Name</literal> line of the desktop
file. An alternative is to use
<function>KApplication::startServiceByDesktopName()</function>, which takes
<function>TDEApplication::startServiceByDesktopName()</function>, which takes
the file name of its desktop file as argument, i.e. in this case
<literal>"kio_uiserver.desktop"</literal>.
</para>

@ -46,7 +46,7 @@ int main(int argc, char **argv)
about.addAuthor( "Alexander Dymo", "Port to KDE, partification", "adymo@tdevelop.org" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
// see if we are starting with session management
if (app.isRestored())

@ -7,7 +7,7 @@
int main(int argc, char **argv)
{
KApplication app(argc, argv, "%{APPNAMELC}_client", false);
TDEApplication app(argc, argv, "%{APPNAMELC}_client", false);
// get our DCOP client and attach so that we may use it
DCOPClient *client = app.dcopClient();

@ -25,7 +25,7 @@ int main(int argc, char **argv)
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
// register ourselves as a dcop client
app.dcopClient()->registerAs(app.name(), false);

@ -24,7 +24,7 @@ int main(int argc, char **argv)
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
// see if we are starting with session management
if (app.isRestored())

@ -21,7 +21,7 @@ int main(int argc, char **argv)
KCmdLineOptions options;
options.add("+[URL]", ki18n( "Document to open" ));
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
%{APPNAME} *widget = new %{APPNAME};

@ -24,7 +24,7 @@ int main(int argc, char **argv)
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
%{APPNAME} *mainWin = 0;
if (app.isRestored())

@ -24,7 +24,7 @@ int main(int argc, char **argv)
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
%{APPNAME} *mainWin = 0;
if (app.isRestored())

@ -24,7 +24,7 @@ int main(int argc, char **argv)
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
%{APPNAME} *mainWin = 0;
if (app.isRestored())

@ -24,7 +24,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
KApplication app;
TDEApplication app;
MainViewImp *widget = new MainViewImp;
app.setMainWidget(widget);
widget->show();

@ -23,7 +23,7 @@ int main(int argc, char **argv)
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
// see if we are starting with session management
if (app.isRestored())

@ -31,7 +31,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
// see if we are starting with session management
/*if (app.isRestored())

@ -24,7 +24,7 @@ int main(int argc, char **argv)
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
// see if we are starting with session management
if (app.isRestored())

@ -24,7 +24,7 @@ int main(int argc, char **argv)
about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
// see if we are starting with session management
if (app.isRestored())

@ -420,7 +420,7 @@ void BackgroundParser::fileParsed( ParsedFile& file ) {
m_unitDict.insert( file.fileName(), unit );
KApplication::postEvent( m_cppSupport, new FileParsedEvent( file.fileName(), unit->problems, m_readFromDisk ) );
TDEApplication::postEvent( m_cppSupport, new FileParsedEvent( file.fileName(), unit->problems, m_readFromDisk ) );
m_currentFile = TQString();

@ -988,7 +988,7 @@ void VariableTree::keyPressEvent(TQKeyEvent* e)
void VariableTree::copyToClipboard(TQListViewItem* item)
{
TQClipboard *qb = KApplication::clipboard();
TQClipboard *qb = TDEApplication::clipboard();
TQString text = item->text( 1 );
qb->setText( text, TQClipboard::Clipboard );

@ -431,7 +431,7 @@
<entry name="classes, documentation" url="ch15.html"/>
<entry name="classes, KAction" url="ch05.html"/>
<entry name="classes, KAction" url="ch06.html"/>
<entry name="classes, KApplication" url="ch02lev1sec3.html"/>
<entry name="classes, TDEApplication" url="ch02lev1sec3.html"/>
<entry name="classes, KAudioPlayer" url="ch14lev1sec6.html"/>
<entry name="classes, TDE versus Qt" url="ch03lev1sec2.html"/>
<entry name="classes, KDialogBase" url="ch08lev1sec5.html"/>
@ -1275,7 +1275,7 @@
<entry name="kabdemo.h class declaration (KabDemo)" url="ch10lev1sec4.html"/>
<entry name="KAction class" url="ch05.html"/>
<entry name="KAction class" url="ch06.html"/>
<entry name="KApplication class" url="ch02lev1sec3.html"/>
<entry name="TDEApplication class" url="ch02lev1sec3.html"/>
<entry name="KAudioPlayer class" url="ch14lev1sec6.html"/>
<entry name="KButtonBox manager widget" url="ch08lev1sec4.html"/>
<entry name="kchildren.cpp class definition (KChildren widget)" url="ch04lev1sec3.html"/>
@ -2236,7 +2236,7 @@
<entry name="programs, GUI elements, toolbars" url="ch02lev1sec4.html"/>
<entry name="programs, programming conventions, class documentation" url="ch02lev1sec5.html"/>
<entry name="programs, programming conventions, naming conventions" url="ch02lev1sec5.html"/>
<entry name="programs, structure of, KApplication class" url="ch02lev1sec3.html"/>
<entry name="programs, structure of, TDEApplication class" url="ch02lev1sec3.html"/>
<entry name="programs, structure of, KTMainWindow class" url="ch02lev1sec3.html"/>
<entry name="programs, structure of, main() method" url="ch02lev1sec3.html"/>
<entry name="programs, structure of" url="ch02lev1sec3.html"/>

@ -41,8 +41,8 @@ TQListBoxItem* TQListBox_selectedItem( TQListBox* cpTQListBox )
SettingsDialog::SettingsDialog( TQWidget* parent, const char* name, WFlags fl )
: SettingsDialogBase( parent, name, fl )
{
KApplication::kApplication()->dirs()->addResourceType("include","include");
TQStringList tdedirs=KApplication::kApplication()->dirs()->findDirs("include","");
TDEApplication::kApplication()->dirs()->addResourceType("include","include");
TQStringList tdedirs=TDEApplication::kApplication()->dirs()->findDirs("include","");
for( TQStringList::Iterator it=tdedirs.begin(); it!=tdedirs.end(); ++it )
{
TQString tdedir = *it;

@ -76,7 +76,7 @@ public void load(KURL url)
public void setupActions()
{
KApplication kapp = KApplication.kApplication();
TDEApplication kapp = TDEApplication.kApplication();
KStdAction.openNew(this, SLOT("fileNew()"), actionCollection());
KStdAction.open(this, SLOT("fileOpen()"), actionCollection());
KStdAction.save(this, SLOT("fileSave()"), actionCollection());
@ -242,7 +242,7 @@ static void main(String[] cmdLineArgs)
about.addAuthor( "%{AUTHOR}", null, "%{EMAIL}" );
KCmdLineArgs.init(cmdLineArgs, about);
KCmdLineArgs.addCmdLineOptions(options);
KApplication app = new KApplication();
TDEApplication app = new TDEApplication();
// see if we are starting with session management
if (app.isRestored())

@ -9,7 +9,7 @@
int main(int argc, char **argv)
{
KApplication app(argc, argv, "%{APPNAMELC}_client", false);
TDEApplication app(argc, argv, "%{APPNAMELC}_client", false);
// get our DCOP client and attach so that we may use it
DCOPClient *client = app.dcopClient();

@ -269,7 +269,7 @@ Unit* BackgroundParser::parseFile( const TQString& fileName, bool readFromDisk )
if( m_fileList->contains(fileName) ){
kdDebug(9013) << "========================> FILE: " << fileName << " IN QUEUE <=============" << endl;
} else {
KApplication::postEvent( m_javaSupport, new FileParsedEvent(fileName, unit->problems) );
TDEApplication::postEvent( m_javaSupport, new FileParsedEvent(fileName, unit->problems) );
}
m_currentFile = TQString();

@ -576,7 +576,7 @@ TQValueList<ClassDom> PHPFile::classByName(TQString classname) {
*/
void PHPFile::postEvent(FileParseEvent *event) {
KApplication::postEvent( m_part, event );
TDEApplication::postEvent( m_part, event );
usleep(100);
}

@ -202,7 +202,7 @@ void VariableTree::slotContextMenu(KListView *, TQListViewItem *item)
emit removeWatchExpression(((WatchVarItem*)item)->displayId());
delete item;
} else if (res == idCopyToClipboard) {
TQClipboard *qb = KApplication::clipboard();
TQClipboard *qb = TDEApplication::clipboard();
TQString text = "{ \"" + item->text( VAR_NAME_COLUMN ) + "\", " +
"\"" + item->text( VALUE_COLUMN ) + "\" }";

@ -623,7 +623,7 @@ TQCString DocumentationPart::startAssistant()
{
static TQCString lastAssistant = "";
if (!lastAssistant.isEmpty() && KApplication::dcopClient()->isApplicationRegistered(lastAssistant))
if (!lastAssistant.isEmpty() && TDEApplication::dcopClient()->isApplicationRegistered(lastAssistant))
return lastAssistant;
const char *function = 0;
@ -636,7 +636,7 @@ TQCString DocumentationPart::startAssistant()
TQDataStream arg(data, IO_WriteOnly);
arg << app << URLs;
if (!KApplication::dcopClient()->call("klauncher", "klauncher", function, data, replyType, replyData))
if (!TDEApplication::dcopClient()->call("klauncher", "klauncher", function, data, replyType, replyData))
{
kdDebug() << "call failed" << endl;
lastAssistant = "";
@ -665,7 +665,7 @@ TQCString DocumentationPart::startAssistant()
kdDebug() << dcopName.data() << endl;
//@fixme: is there another way to wait for the remote object to be loaded
while (!KApplication::dcopClient()->remoteObjects(dcopName).contains("KDevDocumentation"))
while (!TDEApplication::dcopClient()->remoteObjects(dcopName).contains("KDevDocumentation"))
usleep(500);
}
}
@ -697,7 +697,7 @@ void DocumentationPart::activateAssistantWindow(const TQCString &ref)
kdDebug() << "DocumentationPart::activateAssistantWindow" << endl;
TQByteArray data, replyData;
TQCString replyType;
if (KApplication::dcopClient()->call(ref, "MainWindow", "getWinID()", data, replyType, replyData))
if (TDEApplication::dcopClient()->call(ref, "MainWindow", "getWinID()", data, replyType, replyData))
{
kdDebug() << " call successful " << endl;
TQDataStream reply(replyData, IO_ReadOnly);
@ -707,7 +707,7 @@ void DocumentationPart::activateAssistantWindow(const TQCString &ref)
kdDebug() << "Win ID: " << winId << endl;
KWin::forceActiveWindow(winId);
KApplication::dcopClient()->send(ref, "MainWindow", "show()", TQByteArray());
TDEApplication::dcopClient()->send(ref, "MainWindow", "show()", TQByteArray());
}
}
@ -715,7 +715,7 @@ void DocumentationPart::callAssistant(const TQCString &interface, const TQCStrin
{
TQCString ref = startAssistant();
TQByteArray data;
if (KApplication::dcopClient()->send(ref, interface, method, data))
if (TDEApplication::dcopClient()->send(ref, interface, method, data))
activateAssistantWindow(ref);
else
kdDebug() << "problem communicating with: " << ref;
@ -727,7 +727,7 @@ void DocumentationPart::callAssistant(const TQCString &interface, const TQCStrin
TQByteArray data;
TQDataStream arg(data, IO_WriteOnly);
arg << dataStr;
if (KApplication::dcopClient()->send(ref, interface, method, data))
if (TDEApplication::dcopClient()->send(ref, interface, method, data))
activateAssistantWindow(ref);
else
kdDebug() << "problem communicating with: " << ref;

@ -456,7 +456,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
KGlobal::locale()->setMainCatalogue("tdevelop");

@ -46,7 +46,7 @@ TipOfDayPart::TipOfDayPart(TQObject *parent, const char *name, const TQStringLis
TQString TipOfDayPart::getFilename()
{
KConfig * config = KApplication::kApplication()->config();
KConfig * config = TDEApplication::kApplication()->config();
config->setGroup("Tip of day plugin");
return config->readEntry("TipsFile", "kdevtipofday/tips");
}

@ -51,7 +51,7 @@ Example:
KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineArgs::addCmdLineOptions( options );
KApplication app;
TDEApplication app;
MyAppExtension::init();

@ -84,7 +84,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
KApplication app;
TDEApplication app;
KDevIDEExtension::init();

@ -78,7 +78,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::addCmdLineOptions( options );
// TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
KApplication app;
TDEApplication app;
KDevAssistantExtension::init();

@ -36,7 +36,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app(argc, argv);
TDEApplication app(argc, argv);
ProfileEditor editor;
editor.show();
app.setMainWidget(&editor);

@ -54,7 +54,7 @@ else
fi
tdelibs_doxydirs="$ac_tdelibs_doxydirs $ac_kde_htmldir/default/tdelibs-apidocs $ac_kde_htmldir/en/tdelibs-apidocs"
AC_FIND_FILE(tdecore/html/classKApplication.html, $tdelibs_doxydirs, tdelibs_doxydir)
AC_FIND_FILE(tdecore/html/classTDEApplication.html, $tdelibs_doxydirs, tdelibs_doxydir)
AC_MSG_RESULT($tdelibs_doxydir)
if test "$tdelibs_doxydir" = NO; then
tdelibs_doxydir=""

@ -785,7 +785,7 @@ bool CvsServicePartImpl::requestCvsService()
TQCString appId;
TQString error;
if (KApplication::startServiceByDesktopName( "cvsservice",
if (TDEApplication::startServiceByDesktopName( "cvsservice",
TQStringList(), &error, &appId ))
{
TQString msg = i18n( "Unable to find the Cervisia KPart. \n"

@ -95,7 +95,7 @@ void IntegratorDlg::login_clicked()
TQCString appId;
TQString error;
if (KApplication::startServiceByDesktopName("cvsservice",
if (TDEApplication::startServiceByDesktopName("cvsservice",
TQStringList(), &error, &appId))
{
TQString msg = i18n("Unable to find the Cervisia KPart. \n"
@ -154,7 +154,7 @@ void IntegratorDlg::accept()
/* TQCString appId;
TQString error;
if (KApplication::startServiceByDesktopName("cvsservice",
if (TDEApplication::startServiceByDesktopName("cvsservice",
TQStringList(), &error, &appId))
{
TQString msg = i18n("Unable to find the Cervisia KPart. \n"

@ -32,7 +32,7 @@
class KDevProject;
class subversionPart;
class subversionWidget;
class KApplication;
class TDEApplication;
class SvnBlameHolder;
class SvnLogHolder;
class SvnLogViewWidget;

Loading…
Cancel
Save