From be256666b2d960267a6162df5fbb0a26db62796a Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 7 Feb 2022 10:28:49 +0900 Subject: Removed QT_NON_COMMERCIAL check and related code. Signed-off-by: Michele Calgaro (cherry picked from commit cde9d7e9428e90ce8ba0bb86802f85f186adf741) --- tools/designer/app/main.cpp | 4 ---- tools/designer/designer/mainwindow.cpp | 6 ------ tools/designer/designer/mainwindow.h | 3 --- tools/designer/designer/mainwindowactions.cpp | 13 ------------- tools/designer/designer/propertyeditor.cpp | 4 ---- tools/designer/designer/resource.cpp | 9 --------- tools/designer/designer/widgetfactory.cpp | 8 -------- 7 files changed, 47 deletions(-) (limited to 'tools') diff --git a/tools/designer/app/main.cpp b/tools/designer/app/main.cpp index 99cd0caab..230097646 100644 --- a/tools/designer/app/main.cpp +++ b/tools/designer/app/main.cpp @@ -200,11 +200,7 @@ int main( int argc, char *argv[] ) MainWindow *mw = new MainWindow( creatPid ); a.setMainWidget( mw ); -#if defined(QT_NON_COMMERCIAL) - mw->setCaption( "TQt Designer by Trolltech for non-commercial use" ); -#else mw->setCaption( "TQt Designer by Trolltech" ); -#endif if ( config.readBoolEntry( keybase + "Geometries/MainwindowMaximized", FALSE ) ) { int x = config.readNumEntry( keybase + "Geometries/MainwindowX", 0 ); int y = config.readNumEntry( keybase + "Geometries/MainwindowY", 0 ); diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index 3c837a9da..2d67494b6 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -202,13 +202,7 @@ Q_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &plg singleProject = single; statusBar()->clear(); -#if defined(QT_NON_COMMERCIAL) - statusBar()->addWidget( new TQLabel(tr("Ready - This is the non-commercial version of TQt - " - "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 ); -#else statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 ); -#endif - set_splash_status( "Setting up GUI..." ); setupMDI(); diff --git a/tools/designer/designer/mainwindow.h b/tools/designer/designer/mainwindow.h index e5037451a..db7fb14a7 100644 --- a/tools/designer/designer/mainwindow.h +++ b/tools/designer/designer/mainwindow.h @@ -405,9 +405,6 @@ private: TQAction* actionCurrentTool; TQAction *actionHelpContents, *actionHelpAbout, *actionHelpAboutTQt, *actionHelpWhatsThis; TQAction *actionHelpManual; -#if defined(QT_NON_COMMERCIAL) - TQAction *actionHelpRegister; -#endif TQAction *actionToolsCustomWidget, *actionEditPreferences; TQAction *actionWindowTile, *actionWindowCascade, *actionWindowClose, *actionWindowCloseAll; TQAction *actionWindowNext, *actionWindowPrevious; diff --git a/tools/designer/designer/mainwindowactions.cpp b/tools/designer/designer/mainwindowactions.cpp index c0b4210b7..4fd111264 100644 --- a/tools/designer/designer/mainwindowactions.cpp +++ b/tools/designer/designer/mainwindowactions.cpp @@ -993,14 +993,6 @@ void MainWindow::setupHelpActions() actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); connect( actionHelpAboutTQt, SIGNAL( activated() ), this, SLOT( helpAboutTQt() ) ); -#if 0 //defined(QT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister = new TQAction( tr("Register TQt"), TQPixmap(), tr("&Register TQt..."), 0, this, 0 ); - actionHelpRegister->setStatusTip( tr("Opens a web browser at the evaluation form on www.trolltech.com") ); - actionHelpRegister->setWhatsThis( tr("Register with Trolltech") ); - connect( actionHelpRegister, SIGNAL( activated() ), this, SLOT( helpRegister() ) ); -#endif - actionHelpWhatsThis = new TQAction( tr("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), tr("What's This?"), SHIFT + Key_F1, this, 0 ); actionHelpWhatsThis->setStatusTip( tr("\"What's This?\" context sensitive help") ); @@ -1021,11 +1013,6 @@ void MainWindow::setupHelpActions() menu->insertSeparator(); actionHelpAbout->addTo( menu ); actionHelpAboutTQt->addTo( menu ); -#if 0 //defined(QT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister->addTo( menu ); -#endif - menu->insertSeparator(); actionHelpWhatsThis->addTo( menu ); } diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp index 27f9bfeb5..8ddc2dac4 100644 --- a/tools/designer/designer/propertyeditor.cpp +++ b/tools/designer/designer/propertyeditor.cpp @@ -2309,11 +2309,7 @@ void PropertyPaletteItem::getPalette() if ( ::tqt_cast(w) ) w = ( (TQScrollView*)w )->viewport(); TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), -#if defined(QT_NON_COMMERCIAL) - w->backgroundMode(), listview->topLevelWidget(), -#else w->backgroundMode(), listview, -#endif "choose_palette", listview->propertyEditor()->formWindow() ); if ( !ok ) return; diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp index e4fd8f3a7..0878e0452 100644 --- a/tools/designer/designer/resource.cpp +++ b/tools/designer/designer/resource.cpp @@ -497,17 +497,8 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) if ( !customWidgets.isNull() ) loadCustomWidgets( customWidgets, this ); -#if defined (QT_NON_COMMERCIAL) - bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE; - TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self ); - if ( !w ) - return FALSE; - if ( previewMode ) - w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), TRUE ); -#else if ( !createObject( widget, formwindow) ) return FALSE; -#endif if ( !forwards.isNull() ) { for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) diff --git a/tools/designer/designer/widgetfactory.cpp b/tools/designer/designer/widgetfactory.cpp index 97f3332e0..cb5e9db80 100644 --- a/tools/designer/designer/widgetfactory.cpp +++ b/tools/designer/designer/widgetfactory.cpp @@ -854,20 +854,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare dia = new TQDesignerDialog( (FormWindow*)parent, parent, name ); else dia = new TQDialog( parent, name ); -#if defined(QT_NON_COMMERCIAL) - if ( ::tqt_cast(parent) ) -#else if ( parent ) -#endif dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); return dia; } else if ( className == "TQWizard" ) { TQWizard *wiz = new TQDesignerWizard( parent, name ); -#if defined(QT_NON_COMMERCIAL) - if ( ::tqt_cast(parent) ) -#else if ( parent ) -#endif wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); if ( init && ::tqt_cast(parent) ) { TQDesignerWidget *dw = new TQDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); -- cgit v1.2.1