Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 68a4fdfd2c
commit 6ec5cc8d82

@ -1970,20 +1970,20 @@ cat > conftest.$ac_ext <<EOF
#include <kapp.h> #include <kapp.h>
int main() { int main() {
printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data()); printf("kde_htmldir=\\"%s\\"\n", TDEApplication::kde_htmldir().data());
printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data()); printf("kde_appsdir=\\"%s\\"\n", TDEApplication::kde_appsdir().data());
printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data()); printf("kde_icondir=\\"%s\\"\n", TDEApplication::kde_icondir().data());
printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data()); printf("kde_sounddir=\\"%s\\"\n", TDEApplication::kde_sounddir().data());
printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data()); printf("kde_datadir=\\"%s\\"\n", TDEApplication::kde_datadir().data());
printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data()); printf("kde_locale=\\"%s\\"\n", TDEApplication::kde_localedir().data());
printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data()); printf("kde_cgidir=\\"%s\\"\n", TDEApplication::kde_cgidir().data());
printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data()); printf("kde_confdir=\\"%s\\"\n", TDEApplication::kde_configdir().data());
printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data()); printf("kde_mimedir=\\"%s\\"\n", TDEApplication::kde_mimedir().data());
printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data()); printf("kde_toolbardir=\\"%s\\"\n", TDEApplication::kde_toolbardir().data());
printf("kde_wallpaperdir=\\"%s\\"\n", printf("kde_wallpaperdir=\\"%s\\"\n",
KApplication::kde_wallpaperdir().data()); TDEApplication::kde_wallpaperdir().data());
printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data()); printf("kde_bindir=\\"%s\\"\n", TDEApplication::kde_bindir().data());
printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data()); printf("kde_partsdir=\\"%s\\"\n", TDEApplication::kde_partsdir().data());
printf("kde_servicesdir=\\"/tmp/dummy\\"\n"); printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n"); printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
printf("kde_moduledir=\\"/tmp/dummy\\"\n"); printf("kde_moduledir=\\"/tmp/dummy\\"\n");

@ -391,7 +391,7 @@ void KisImagePipeBrush::selectNextBrush(const KisPaintInformation& info) const {
case KisPipeBrushParasite::Incremental: case KisPipeBrushParasite::Incremental:
index = (index + 1) % m_parasite.rank[i]; break; index = (index + 1) % m_parasite.rank[i]; break;
case KisPipeBrushParasite::Random: case KisPipeBrushParasite::Random:
index = int(float(m_parasite.rank[i])*KApplication::random() / RAND_MAX); break; index = int(float(m_parasite.rank[i])*TDEApplication::random() / RAND_MAX); break;
case KisPipeBrushParasite::Pressure: case KisPipeBrushParasite::Pressure:
index = static_cast<int>(info.pressure * (m_parasite.rank[i] - 1) + 0.5); break; index = static_cast<int>(info.pressure * (m_parasite.rank[i] - 1) + 0.5); break;
case KisPipeBrushParasite::Angular: case KisPipeBrushParasite::Angular:

@ -131,8 +131,8 @@ void KisToolZoom::slotTimer()
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton); int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton);
#else #else
int state = kapp->keyboardModifiers() & (KApplication::ShiftModifier int state = kapp->keyboardModifiers() & (TDEApplication::ShiftModifier
|KApplication::ControlModifier|KApplication::Modifier1); |TDEApplication::ControlModifier|TDEApplication::Modifier1);
#endif #endif
if (state & TQt::ControlButton) { if (state & TQt::ControlButton) {

@ -168,8 +168,8 @@ void KisToolSelectSimilar::slotTimer()
#if KDE_IS_VERSION(3,4,0) #if KDE_IS_VERSION(3,4,0)
int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton); int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton);
#else #else
int state = kapp->keyboardModifiers() & (KApplication::ShiftModifier int state = kapp->keyboardModifiers() & (TDEApplication::ShiftModifier
|KApplication::ControlModifier|KApplication::Modifier1); |TDEApplication::ControlModifier|TDEApplication::Modifier1);
#endif #endif
enumSelectionMode action; enumSelectionMode action;

@ -21,7 +21,7 @@ int main(int argc, char **argv)
"nhasan@kde.org" ); "nhasan@kde.org" );
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; TDEApplication app;
KImageIO::registerFormats(); KImageIO::registerFormats();

@ -1120,7 +1120,7 @@ void KisDoc::IODone()
void KisDoc::slotIOProgress(TQ_INT8 percentage) void KisDoc::slotIOProgress(TQ_INT8 percentage)
{ {
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
Q_ASSERT(app); Q_ASSERT(app);

@ -169,7 +169,7 @@ void KisLabelProgress::update(int percent)
{ {
m_bar->setValue(percent); m_bar->setValue(percent);
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
app->processEvents(); app->processEvents();
// The following is safer, but makes cancel impossible: // The following is safer, but makes cancel impossible:
@ -181,7 +181,7 @@ void KisLabelProgress::updateStage(const TQString&, int percent)
{ {
m_bar->setValue(percent); m_bar->setValue(percent);
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
Q_ASSERT(app); Q_ASSERT(app);
app->processEvents(); app->processEvents();

@ -309,7 +309,7 @@ namespace {
static bool init = false; static bool init = false;
if (!init) { if (!init) {
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
InitializeMagick(*app -> argv()); InitializeMagick(*app -> argv());
atexit(DestroyMagick); atexit(DestroyMagick);
@ -330,7 +330,7 @@ namespace {
#if 0 #if 0
MagickBooleanType monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *) MagickBooleanType monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *)
{ {
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
Q_ASSERT(app); Q_ASSERT(app);
@ -343,7 +343,7 @@ namespace {
#else #else
unsigned int monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *) unsigned int monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *)
{ {
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
Q_ASSERT(app); Q_ASSERT(app);

@ -257,7 +257,7 @@ namespace {
static bool init = false; static bool init = false;
if (!init) { if (!init) {
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
InitializeMagick(*app -> argv()); InitializeMagick(*app -> argv());
atexit(DestroyMagick); atexit(DestroyMagick);
@ -278,7 +278,7 @@ namespace {
#ifdef HAVE_MAGICK6 #ifdef HAVE_MAGICK6
MagickBooleanType monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *) MagickBooleanType monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *)
{ {
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
Q_ASSERT(app); Q_ASSERT(app);
@ -291,7 +291,7 @@ namespace {
#else #else
unsigned int monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *) unsigned int monitor(const char *text, const ExtendedSignedIntegralType, const ExtendedUnsignedIntegralType, ExceptionInfo *)
{ {
KApplication *app = KApplication::kApplication(); TDEApplication *app = TDEApplication::kApplication();
Q_ASSERT(app); Q_ASSERT(app);

@ -912,7 +912,7 @@ XML Export TODO:
(templates/XSLT could be also supported) (templates/XSLT could be also supported)
General TODO: General TODO:
- handle KApplication::shutDown() - handle TDEApplication::shutDown()
TODO: TODO:
- on opening detect whether a table exists (empty table view should not be displayed) - on opening detect whether a table exists (empty table view should not be displayed)

@ -122,7 +122,7 @@ FormManager::FormManager(TQObject *parent, int options, const char *name)
#endif #endif
connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
slotSettingsChanged(KApplication::SETTINGS_SHORTCUTS); slotSettingsChanged(TDEApplication::SETTINGS_SHORTCUTS);
//moved to createWidgetLibrary() m_lib = new WidgetLibrary(this, supportedFactoryGroups); //moved to createWidgetLibrary() m_lib = new WidgetLibrary(this, supportedFactoryGroups);
m_propSet = new WidgetPropertySet(this); m_propSet = new WidgetPropertySet(this);
@ -1459,7 +1459,7 @@ FormManager::showFormUICode()
void void
FormManager::slotSettingsChanged(int category) FormManager::slotSettingsChanged(int category)
{ {
if (category==KApplication::SETTINGS_SHORTCUTS) { if (category==TDEApplication::SETTINGS_SHORTCUTS) {
m_contextMenuKey = KGlobalSettings::contextMenuKey(); m_contextMenuKey = KGlobalSettings::contextMenuKey();
} }
} }

@ -45,7 +45,7 @@ int main(int argc, char **argv)
about.addCredit( "Kristof Borrey ", "Icons", 0, "kristof.borrey@skynet.be" ); about.addCredit( "Kristof Borrey ", "Icons", 0, "kristof.borrey@skynet.be" );
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; TDEApplication app;
KGlobal::iconLoader()->addAppDir("kexi"); KGlobal::iconLoader()->addAppDir("kexi");

@ -87,12 +87,12 @@ namespace KexiUtils
} }
/*! Sets "wait" cursor with 1 second delay (or 0 seconds if noDelay is true). /*! Sets "wait" cursor with 1 second delay (or 0 seconds if noDelay is true).
Does nothing if the application has no GUI enabled. (see KApplication::guiEnabled()) */ Does nothing if the application has no GUI enabled. (see TDEApplication::guiEnabled()) */
KEXIUTILS_EXPORT void setWaitCursor(bool noDelay = false); KEXIUTILS_EXPORT void setWaitCursor(bool noDelay = false);
/*! Remove "wait" cursor previously set with \a setWaitCursor(), /*! Remove "wait" cursor previously set with \a setWaitCursor(),
even if it's not yet visible. even if it's not yet visible.
Does nothing if the application has no GUI enabled. (see KApplication::guiEnabled()) */ Does nothing if the application has no GUI enabled. (see TDEApplication::guiEnabled()) */
KEXIUTILS_EXPORT void removeWaitCursor(); KEXIUTILS_EXPORT void removeWaitCursor();
/*! Helper class. Allocate it in your code block as follows: /*! Helper class. Allocate it in your code block as follows:
@ -101,7 +101,7 @@ namespace KexiUtils
</code> </code>
.. and wait cursor will be visible (with one second delay) until you're in this block, without .. and wait cursor will be visible (with one second delay) until you're in this block, without
a need to call removeWaitCursor() before exiting the block. a need to call removeWaitCursor() before exiting the block.
Does nothing if the application has no GUI enabled. (see KApplication::guiEnabled()) */ Does nothing if the application has no GUI enabled. (see TDEApplication::guiEnabled()) */
class KEXIUTILS_EXPORT WaitCursor class KEXIUTILS_EXPORT WaitCursor
{ {
public: public:
@ -116,7 +116,7 @@ namespace KexiUtils
.. and the wait cursor will be hidden unless you leave this block, without .. and the wait cursor will be hidden unless you leave this block, without
a need to call setWaitCursor() before exiting the block. After leaving the codee block, a need to call setWaitCursor() before exiting the block. After leaving the codee block,
the cursor will be visible again, if it was visible before creating the WaitCursorRemover object. the cursor will be visible again, if it was visible before creating the WaitCursorRemover object.
Does nothing if the application has no GUI enabled. (see KApplication::guiEnabled()) */ Does nothing if the application has no GUI enabled. (see TDEApplication::guiEnabled()) */
class KEXIUTILS_EXPORT WaitCursorRemover class KEXIUTILS_EXPORT WaitCursorRemover
{ {
public: public:

@ -151,7 +151,7 @@ int KexiMainWindowImpl::create(int argc, char *argv[], KAboutData* aboutdata)
bool GUIenabled = true; bool GUIenabled = true;
TQWidget *dummyWidget = 0; //needed to have icon for dialogs before KexiMainWindowImpl is created TQWidget *dummyWidget = 0; //needed to have icon for dialogs before KexiMainWindowImpl is created
//! @todo switch GUIenabled off when needed //! @todo switch GUIenabled off when needed
KApplication* app = new KApplication(true, GUIenabled); TDEApplication* app = new TDEApplication(true, GUIenabled);
#ifdef KEXI_STANDALONE #ifdef KEXI_STANDALONE
KGlobal::locale()->removeCatalogue("kexi"); KGlobal::locale()->removeCatalogue("kexi");
@ -3957,13 +3957,13 @@ void KexiMainWindowImpl::slotStartFeedbackAgent()
{ {
#ifndef KEXI_NO_FEEDBACK_AGENT #ifndef KEXI_NO_FEEDBACK_AGENT
#ifdef FEEDBACK_CLASS #ifdef FEEDBACK_CLASS
const KAboutData* about = KApplication::kApplication()->aboutData(); const KAboutData* about = TDEApplication::kApplication()->aboutData();
FEEDBACK_CLASS* wizard = new FEEDBACK_CLASS( about->programName(), FEEDBACK_CLASS* wizard = new FEEDBACK_CLASS( about->programName(),
about->version(), 0, 0, 0, FEEDBACK_CLASS::AllPages ); about->version(), 0, 0, 0, FEEDBACK_CLASS::AllPages );
if ( wizard->exec() ) if ( wizard->exec() )
{ {
KApplication::kApplication()->invokeMailer( "kexi-reports-dummy@kexi.org", TDEApplication::kApplication()->invokeMailer( "kexi-reports-dummy@kexi.org",
TQString(), TQString(), TQString(), TQString(),
about->appName() + TQCString( " [feedback]" ), about->appName() + TQCString( " [feedback]" ),
wizard->feedbackDocument().toString( 2 ).local8Bit() ); wizard->feedbackDocument().toString( 2 ).local8Bit() );

@ -52,7 +52,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
KexiMainWindowImpl(); KexiMainWindowImpl();
virtual ~KexiMainWindowImpl(); virtual ~KexiMainWindowImpl();
/*! Used by the main kexi routine. Creates a new Kexi main window and a new KApplication object. /*! Used by the main kexi routine. Creates a new Kexi main window and a new TDEApplication object.
kdemain() has to destroy the latter on exit. kdemain() has to destroy the latter on exit.
\return result 1 on error and 0 on success (the result can be used as a result of kdemain()) */ \return result 1 on error and 0 on success (the result can be used as a result of kdemain()) */
static int create(int argc, char *argv[], KAboutData* aboutdata = 0); static int create(int argc, char *argv[], KAboutData* aboutdata = 0);

@ -600,7 +600,7 @@ bool ImportWizard::fileBasedDstSelected() const
void ImportWizard::progressUpdated(int percent) { void ImportWizard::progressUpdated(int percent) {
m_progressBar->setProgress(percent); m_progressBar->setProgress(percent);
KApplication::kApplication()->processEvents(); TDEApplication::kApplication()->processEvents();
} }
//=========================================================== //===========================================================

@ -38,7 +38,7 @@ using namespace KexiMigration;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
KApplication app(argc, argv, "Kexi Migrate Test"); TDEApplication app(argc, argv, "Kexi Migrate Test");
ImportWizard* iw = new ImportWizard(); ImportWizard* iw = new ImportWizard();
iw->setGeometry(300,300,300,250); iw->setGeometry(300,300,300,250);

@ -42,7 +42,7 @@ int main( int argc, char** argv )
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
//create an new "Console"-runner //create an new "Console"-runner
KUnitTest::Runner * runner = KUnitTest::Runner::self(); KUnitTest::Runner * runner = KUnitTest::Runner::self();

@ -43,7 +43,7 @@ int main( int argc, char** argv )
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
//create new kapplication //create new kapplication
KApplication app; TDEApplication app;
//create new kunitrunnergui //create new kunitrunnergui
KUnitTest::RunnerGUI runner(0); KUnitTest::RunnerGUI runner(0);
//show the ui //show the ui

@ -28,7 +28,7 @@ int main( int argc, char ** argv )
{ {
KAboutData aboutData( "test", I18N_NOOP("KFind"), "0", "", KAboutData::License_LGPL ); KAboutData aboutData( "test", I18N_NOOP("KFind"), "0", "", KAboutData::License_LGPL );
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app; TDEApplication app;
KexiFindDialog dlg(true, 0, "dialog"); KexiFindDialog dlg(true, 0, "dialog");

@ -51,7 +51,7 @@ bool db_name_required = true;
KexiDB::ConnectionData conn_data; KexiDB::ConnectionData conn_data;
TQGuardedPtr<KexiDB::Connection> conn; TQGuardedPtr<KexiDB::Connection> conn;
TQGuardedPtr<KexiDB::Driver> driver; TQGuardedPtr<KexiDB::Driver> driver;
KApplication *app = 0; TDEApplication *app = 0;
KInstance *instance = 0; KInstance *instance = 0;
static KCmdLineOptions options[] = static KCmdLineOptions options[] =
@ -157,7 +157,7 @@ int main(int argc, char** argv)
} }
if (gui) { if (gui) {
app = new KApplication(true, true); app = new TDEApplication(true, true);
instance = app; instance = app;
KGlobal::iconLoader()->addAppDir("kexi"); KGlobal::iconLoader()->addAppDir("kexi");
} }

@ -33,7 +33,7 @@
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
KApplication app(argc, argv, "startup"); TDEApplication app(argc, argv, "startup");
// Widget w; // Widget w;
// app.setMainWidget(&w); // app.setMainWidget(&w);

@ -31,7 +31,7 @@
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
KApplication app(argc, argv, "tv_test"); TDEApplication app(argc, argv, "tv_test");
KGlobal::iconLoader()->addAppDir("kexi"); KGlobal::iconLoader()->addAppDir("kexi");
KexiTableView tv; KexiTableView tv;

@ -46,7 +46,7 @@ int main(int argc, char** argv)
{ {
// Initialise the program // Initialise the program
TDECmdLineArgs::init(argc, argv, "kexidbcomboboxtest", "", "", "", true); TDECmdLineArgs::init(argc, argv, "kexidbcomboboxtest", "", "", "", true);
KApplication* app = new KApplication(true, true); TDEApplication* app = new TDEApplication(true, true);
// Look for installed database drivers // Look for installed database drivers
KexiDB::DriverManager manager; KexiDB::DriverManager manager;

@ -185,7 +185,7 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch
d = new KexiTableViewPrivate(this); d = new KexiTableViewPrivate(this);
connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
slotSettingsChanged(KApplication::SETTINGS_SHORTCUTS); slotSettingsChanged(TDEApplication::SETTINGS_SHORTCUTS);
m_data = new KexiTableViewData(); //to prevent crash because m_data==0 m_data = new KexiTableViewData(); //to prevent crash because m_data==0
m_owner = true; //-this will be deleted if needed m_owner = true; //-this will be deleted if needed
@ -2593,7 +2593,7 @@ KexiTableItem *KexiTableView::highlightedItem() const
void KexiTableView::slotSettingsChanged(int category) void KexiTableView::slotSettingsChanged(int category)
{ {
if (category==KApplication::SETTINGS_SHORTCUTS) { if (category==TDEApplication::SETTINGS_SHORTCUTS) {
d->contextMenuKey = KGlobalSettings::contextMenuKey(); d->contextMenuKey = KGlobalSettings::contextMenuKey();
} }
} }

@ -275,7 +275,7 @@ void KivioCanvas::paintEvent( TQPaintEvent* ev )
painter.save(); painter.save();
painter.setClipRegion(grayRegion, TQPainter::CoordPainter); painter.setClipRegion(grayRegion, TQPainter::CoordPainter);
painter.setPen(TQt::NoPen); painter.setPen(TQt::NoPen);
painter.fillRect(grayRegion.boundingRect(), KApplication::palette().active().brush(TQColorGroup::Mid)); painter.fillRect(grayRegion.boundingRect(), TDEApplication::palette().active().brush(TQColorGroup::Mid));
painter.restore(); painter.restore();
// end of copy... // end of copy...

@ -1709,7 +1709,7 @@ void KivioView::addStencilFromSpawner( KivioStencilSpawner *pSpawner, double x,
#if KDE_IS_VERSION(3, 4, 0) #if KDE_IS_VERSION(3, 4, 0)
if(kapp->keyboardMouseState() & TQt::ControlButton) { if(kapp->keyboardMouseState() & TQt::ControlButton) {
#else #else
if(KApplication::keyboardModifiers() & KApplication::ControlModifier) { if(TDEApplication::keyboardModifiers() & TDEApplication::ControlModifier) {
#endif #endif
pStencil->setFGColor(m_setFGColor->color()); pStencil->setFGColor(m_setFGColor->color());
pStencil->setBGColor(m_setBGColor->color()); pStencil->setBGColor(m_setBGColor->color());

@ -151,7 +151,7 @@ void KivioBirdEyePanel::updateView()
KivioScreenPainter kpainter; KivioScreenPainter kpainter;
kpainter.start(TQT_TQPAINTDEVICE(m_buffer)); kpainter.start(TQT_TQPAINTDEVICE(m_buffer));
kpainter.painter()->fillRect(rect, KApplication::palette().active().brush(TQColorGroup::Mid)); kpainter.painter()->fillRect(rect, TDEApplication::palette().active().brush(TQColorGroup::Mid));
kpainter.painter()->fillRect(px0, py0, pw, ph, white); kpainter.painter()->fillRect(px0, py0, pw, ph, white);

@ -652,7 +652,7 @@ class Samples:
def getCode(self): def getCode(self):
return ( return (
'import qt, tdecore, dcop, dcopext', 'import qt, tdecore, dcop, dcopext',
'dcopclient = tdecore.KApplication.dcopClient()', 'dcopclient = tdecore.TDEApplication.dcopClient()',
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("klipper") ]', 'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("klipper") ]',
'd = dcopext.DCOPApp(apps[0], dcopclient)', 'd = dcopext.DCOPApp(apps[0], dcopclient)',
'result,typename,data = d.appclient.call(apps[0],"klipper","getClipboardContents()","")', 'result,typename,data = d.appclient.call(apps[0],"klipper","getClipboardContents()","")',
@ -670,7 +670,7 @@ class Samples:
return ( return (
'import qt, tdecore, dcop, dcopext', 'import qt, tdecore, dcop, dcopext',
'', '',
'dcopclient = tdecore.KApplication.dcopClient()', 'dcopclient = tdecore.TDEApplication.dcopClient()',
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("amarok") ]', 'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("amarok") ]',
'app = apps[0]', 'app = apps[0]',
'd = dcopext.DCOPApp(app, dcopclient)', 'd = dcopext.DCOPApp(app, dcopclient)',
@ -695,7 +695,7 @@ class Samples:
return ( return (
'import qt, tdecore, dcop, dcopext', 'import qt, tdecore, dcop, dcopext',
'', '',
'dcopclient = tdecore.KApplication.dcopClient()', 'dcopclient = tdecore.TDEApplication.dcopClient()',
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("kopete") ]', 'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("kopete") ]',
'app = apps[0]', 'app = apps[0]',
'd = dcopext.DCOPApp(app, dcopclient)', 'd = dcopext.DCOPApp(app, dcopclient)',
@ -731,7 +731,7 @@ class Samples:
' return ba', ' return ba',
'', '',
'# Get the KWord DCOP client.', '# Get the KWord DCOP client.',
'dcopclient = tdecore.KApplication.dcopClient()', 'dcopclient = tdecore.TDEApplication.dcopClient()',
'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("kword") ]', 'apps = [ app for app in dcopclient.registeredApplications() if str(app).startswith("kword") ]',
'if len(apps) < 1: raise "No KWord instance is running. Please start KWord before!"', 'if len(apps) < 1: raise "No KWord instance is running. Please start KWord before!"',
'appname = apps[0]', 'appname = apps[0]',

@ -52,7 +52,7 @@ int main( int argc, char** argv )
{ {
// Initialize command line args // Initialize command line args
TDECmdLineArgs::init(argc, argv, "formulatest", "formulatest", "unit test", "0.1", true); TDECmdLineArgs::init(argc, argv, "formulatest", "formulatest", "unit test", "0.1", true);
KApplication app(false, false); TDEApplication app(false, false);
run( new FormulaParserTester() ); run( new FormulaParserTester() );
run( new FormulaEvalTester() ); run( new FormulaEvalTester() );

@ -354,7 +354,7 @@ KoDocument* KWDocumentChild::hitTest( const TQPoint& p, const TQWMatrix& _matrix
int keyState = kapp->keyboardMouseState(); int keyState = kapp->keyboardMouseState();
#else #else
int keyState = 0; int keyState = 0;
if ( kapp->keyboardModifiers() & KApplication::ControlModifier ) if ( kapp->keyboardModifiers() & TDEApplication::ControlModifier )
keyState = TQt::ControlButton; keyState = TQt::ControlButton;
#endif #endif

@ -244,7 +244,7 @@ int main(int argc, char** argv)
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication app; TDEApplication app;
app.connect(&app, TQT_SIGNAL(lastWindowClosed()), &app, TQT_SLOT(quit())); app.connect(&app, TQT_SIGNAL(lastWindowClosed()), &app, TQT_SLOT(quit()));

@ -56,7 +56,7 @@ public:
}; };
KoApplication::KoApplication() KoApplication::KoApplication()
: KApplication( initHack() ) : TDEApplication( initHack() )
{ {
d = new KoApplicationPrivate; d = new KoApplicationPrivate;
@ -70,7 +70,7 @@ KoApplication::KoApplication()
m_starting = true; m_starting = true;
} }
// This gets called before entering KApplication::KApplication // This gets called before entering TDEApplication::TDEApplication
bool KoApplication::initHack() bool KoApplication::initHack()
{ {
TDECmdLineArgs::addCmdLineOptions( options, I18N_NOOP("KOffice"), "koffice", "kde" ); TDECmdLineArgs::addCmdLineOptions( options, I18N_NOOP("KOffice"), "koffice", "kde" );

@ -39,7 +39,7 @@ class KoApplicationPrivate;
* If the last mainwindow becomes closed, KoApplication automatically * If the last mainwindow becomes closed, KoApplication automatically
* calls TQApplication::quit. * calls TQApplication::quit.
*/ */
class KOFFICECORE_EXPORT KoApplication : public KApplication class KOFFICECORE_EXPORT KoApplication : public TDEApplication
{ {
Q_OBJECT Q_OBJECT

@ -181,7 +181,7 @@ public:
/** /**
* @brief Used by KoApplication, and by KoMainWindow, when no document exists yet. * @brief Used by KoApplication, and by KoMainWindow, when no document exists yet.
* *
* With the help of @p instance or KApplication::instance() this * With the help of @p instance or TDEApplication::instance() this
* method figures out which .desktop file matches this application. In this * method figures out which .desktop file matches this application. In this
* file it searches for the "X-TDE-NativeMimeType" entry and returns it. * file it searches for the "X-TDE-NativeMimeType" entry and returns it.
* *
@ -193,7 +193,7 @@ public:
/** /**
* Used by KoMainWindow, when no document exists yet. * Used by KoMainWindow, when no document exists yet.
* *
* With the help of @p instance or KApplication::instance() this * With the help of @p instance or TDEApplication::instance() this
* method figures out which .desktop file matches this application. In this * method figures out which .desktop file matches this application. In this
* file it searches for the "X-TDE-ExtraNativeMimeTypes" entry and returns it. * file it searches for the "X-TDE-ExtraNativeMimeTypes" entry and returns it.
* *
@ -203,7 +203,7 @@ public:
static TQStringList readExtraNativeMimeTypes( KInstance *instance = 0 ); static TQStringList readExtraNativeMimeTypes( KInstance *instance = 0 );
/** /**
* With the help of @p instance or KApplication::instance() this * With the help of @p instance or TDEApplication::instance() this
* method figures out which .desktop file matches this application, * method figures out which .desktop file matches this application,
* and returns the KService instance for it. * and returns the KService instance for it.
*/ */

@ -35,7 +35,7 @@ bool check(TQString txt, TQString a, TQString b)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
KApplication app(argc,argv,"korecttest",false,false); TDEApplication app(argc,argv,"korecttest",false,false);
KoRect emptyRect; KoRect emptyRect;
check( "KoRect() is null", emptyRect.isNull(), true ); check( "KoRect() is null", emptyRect.isNull(), true );

@ -462,7 +462,7 @@ void KoKoolBarItem::press()
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
KApplication app( argc, argv ); TDEApplication app( argc, argv );
KoKoolBar bar; KoKoolBar bar;
int file = bar.insertGroup("File"); int file = bar.insertGroup("File");
TQPixmap pix; TQPixmap pix;

@ -102,7 +102,7 @@ int main( int argc, char ** argv )
{ {
srand( time( 0 ) ); srand( time( 0 ) );
KApplication a( argc, argv, "KColorAction Test" ); TDEApplication a( argc, argv, "KColorAction Test" );
TopLevel *toplevel = new TopLevel( 0, "coloractiontest" ); TopLevel *toplevel = new TopLevel( 0, "coloractiontest" );
a.setMainWidget( toplevel ); a.setMainWidget( toplevel );
toplevel->show(); toplevel->show();

@ -41,7 +41,7 @@ int main(int argc, char **argv)
about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr" ); about.addAuthor( "Cedric Pasteur", 0, "cedric.pasteur@free.fr" );
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
Test *mainWin = 0; Test *mainWin = 0;
if (app.isRestored()) if (app.isRestored())

@ -40,7 +40,7 @@ void check_hyphenation( const TQStringList& tests, const TQStringList& results,
int main (int argc, char ** argv) int main (int argc, char ** argv)
{ {
KApplication app(argc, argv, "KoHyphenator test"); TDEApplication app(argc, argv, "KoHyphenator test");
try { try {
hypher = KoHyphenator::self(); hypher = KoHyphenator::self();

@ -47,9 +47,9 @@ private:
int main (int argc, char ** argv) int main (int argc, char ** argv)
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
TDECmdLineArgs::init(argc,argv,"kobordertest", 0, 0, 0, 0); TDECmdLineArgs::init(argc,argv,"kobordertest", 0, 0, 0, 0);
KApplication app; TDEApplication app;
KoZoomHandler* zh = new KoZoomHandler(); KoZoomHandler* zh = new KoZoomHandler();

@ -202,7 +202,7 @@ void KoTextFormatterTest::counterAndBigChar()
int main (int argc, char ** argv) int main (int argc, char ** argv)
{ {
KApplication app(argc, argv, "KoTextFormatter test"); TDEApplication app(argc, argv, "KoTextFormatter test");
// Don't let locale settings lead to different hyphenation output // Don't let locale settings lead to different hyphenation output
KGlobal::locale()->setLanguage( TQString::fromLatin1( "en_US" ) ); KGlobal::locale()->setLanguage( TQString::fromLatin1( "en_US" ) );

@ -320,7 +320,7 @@ void WdgScriptsManager::slotUnloadScript()
void WdgScriptsManager::slotGetNewScript() void WdgScriptsManager::slotGetNewScript()
{ {
#ifdef KROSS_SUPPORT_NEWSTUFF #ifdef KROSS_SUPPORT_NEWSTUFF
const TQString appname = KApplication::kApplication()->name(); const TQString appname = TDEApplication::kApplication()->name();
const TQString type = TQString("%1/script").arg(appname); const TQString type = TQString("%1/script").arg(appname);
if(! d->newstuff) { if(! d->newstuff) {

@ -45,7 +45,7 @@
#define ERROR_UNHALDEDEXCEPTION -5 #define ERROR_UNHALDEDEXCEPTION -5
#define ERROR_EXCEPTION -6 #define ERROR_EXCEPTION -6
KApplication* app = 0; TDEApplication* app = 0;
int runScriptFile(const TQString& scriptfile) int runScriptFile(const TQString& scriptfile)
{ {
@ -125,8 +125,8 @@ int main(int argc, char **argv)
return ERROR_HELP; return ERROR_HELP;
} }
// Create KApplication instance. // Create TDEApplication instance.
app = new KApplication( /* allowStyles */ true, /* GUIenabled */ true ); app = new TDEApplication( /* allowStyles */ true, /* GUIenabled */ true );
//TQString interpretername = args->getOption("interpreter"); //TQString interpretername = args->getOption("interpreter");
//TQString scriptfilename = args->getOption("scriptfile"); //TQString scriptfilename = args->getOption("scriptfile");
@ -138,7 +138,7 @@ int main(int argc, char **argv)
break; break;
} }
// Free the KApplication instance and exit the program. // Free the TDEApplication instance and exit the program.
delete app; delete app;
return result; return result;
} }

@ -49,7 +49,7 @@
#include <string> #include <string>
#include <iostream> #include <iostream>
KApplication *app = 0; TDEApplication *app = 0;
@ -168,7 +168,7 @@ int main(int argc, char **argv)
f.close(); f.close();
if( args->isSet("gui") ) { if( args->isSet("gui") ) {
app = new KApplication(); app = new TDEApplication();
TestWindow *mainWin = new TestWindow(interpretername, scriptcode); TestWindow *mainWin = new TestWindow(interpretername, scriptcode);
app->setMainWidget(mainWin); app->setMainWidget(mainWin);
mainWin->show(); mainWin->show();
@ -176,7 +176,7 @@ int main(int argc, char **argv)
result = app->exec(); result = app->exec();
} }
else { else {
app = new KApplication(true, true); app = new TDEApplication(true, true);
runInterpreter(interpretername, scriptcode); runInterpreter(interpretername, scriptcode);
} }
} }

@ -206,7 +206,7 @@ int test( const char* testName, KoStore::Backend backend, const TQString& testFi
int main( int argc, char **argv ) int main( int argc, char **argv )
{ {
TDECmdLineArgs::init( argc, argv, "storage_test", "A test for the KoStore classes", "1" ); TDECmdLineArgs::init( argc, argv, "storage_test", "A test for the KoStore classes", "1" );
KApplication app( argc, argv ); TDEApplication app( argc, argv );
// KZip (due to KSaveFile) doesn't support relative filenames // KZip (due to KSaveFile) doesn't support relative filenames
// So use $PWD as base for the paths explicitely. // So use $PWD as base for the paths explicitely.

@ -24,9 +24,9 @@ private:
int main( int argc, char** argv ) int main( int argc, char** argv )
{ {
KApplication::disableAutoDcopRegistration(); TDEApplication::disableAutoDcopRegistration();
TDECmdLineArgs::init(argc, argv, "storedroptest", 0, 0, 0, 0); TDECmdLineArgs::init(argc, argv, "storedroptest", 0, 0, 0, 0);
KApplication app; TDEApplication app;
StoreDropTest* window = new StoreDropTest( 0 ); StoreDropTest* window = new StoreDropTest( 0 );
window->resize( 500, 500 ); window->resize( 500, 500 );

@ -81,7 +81,7 @@ int main( int argc, char **argv )
TDECmdLineArgs::init( argc, argv, &aboutData); TDECmdLineArgs::init( argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );
KApplication app; TDEApplication app;
// Install the libkoffice* translations // Install the libkoffice* translations
KGlobal::locale()->insertCatalogue("koffice"); KGlobal::locale()->insertCatalogue("koffice");

@ -41,7 +41,7 @@ extern "C" KOFFICETOOLS_EXPORT int kdemain(int argc, char **argv)
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
KApplication a; // KDataTool needs an instance TDEApplication a; // KDataTool needs an instance
// TODO: take term from command line! // TODO: take term from command line!

Loading…
Cancel
Save