Convert accidental instances of STQL to the proper SQL

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1247182 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent e295fa9ed9
commit c0acd81bbf

@ -268,7 +268,7 @@ void KBarcode::importCSV()
new CSVImportDlg( this, "csvimportdlg" );
}
bool KBarcode::isSTQLConnected() const
bool KBarcode::isSQLConnected() const
{
return SqlTables::isConnected();
}

@ -75,7 +75,7 @@ class KBarcode: public DSMainWindow, public KBarcodeIface {
/** allow the DCOP interface
* to check for an SQL connection.
*/
bool isSTQLConnected() const;
bool isSQLConnected() const;
/** allow the DCOP interface
* to connect to the databases.
*/

@ -37,7 +37,7 @@ class KBarcodeIface : virtual public DCOPObject
virtual void importCSV() = 0;
virtual bool isSTQLConnected() const = 0;
virtual bool isSQLConnected() const = 0;
virtual bool connectSQL() = 0;
virtual void showWizard() = 0;
virtual void showConfigure() = 0;

@ -47,7 +47,7 @@ class MySqlDescription : public SqlDescription {
virtual const TQString showColumns( const TQString & table ) const { return "SHOW COLUMNS FROM " + table; }
};
class PostgreSTQLDescription : public SqlDescription {
class PostgreSQLDescription : public SqlDescription {
public:
virtual const TQString initdb( TQString ) const { return "template1"; }
virtual const TQString autoIncrement() const { return "serial NOT NULL"; }
@ -63,7 +63,7 @@ class PostgreSTQLDescription : public SqlDescription {
};
/** should work for ODBC, too */
class STQLiteDescription : public SqlDescription {
class SQLiteDescription : public SqlDescription {
public:
virtual const TQString initdb( TQString db = TQString() ) const { return db; }
virtual const TQString autoIncrement() const { return "serial NOT NULL"; }
@ -74,10 +74,10 @@ SqlTables::SqlTables( TQObject* parent )
: TQObject( parent, "sqltables" )
{
drivers.insert( "TQMYSQL3", new MySqlDescription() );
drivers.insert( "TQPSQL7", new PostgreSTQLDescription() );
/* The same driver plugin is used for TQDBC and STQLite */
drivers.insert( "TQSQLITE", new STQLiteDescription() );
drivers.insert( "TQODBC3", new STQLiteDescription() );
drivers.insert( "TQPSQL7", new PostgreSQLDescription() );
/* The same driver plugin is used for TQDBC and SQLite */
drivers.insert( "TQSQLITE", new SQLiteDescription() );
drivers.insert( "TQODBC3", new SQLiteDescription() );
db = NULL;
connected = false;

@ -15,8 +15,8 @@
* *
***************************************************************************/
#ifndef STQLTABLES_H
#define STQLTABLES_H
#ifndef SQLTABLES_H
#define SQLTABLES_H
#include <tqobject.h>
#include <tqwidget.h>

@ -109,13 +109,13 @@ void TokenDialog::setupStackPage2()
TQVButtonGroup* group = new TQVButtonGroup( i18n("What do you want to insert?"), stackPage2 );
radioVariable = new TQRadioButton( i18n("Insert a custom &variable"), group );
radioSTQLQuery = new TQRadioButton( i18n("Insert a &SQL query"), group );
radioSQLQuery = new TQRadioButton( i18n("Insert a &SQL query"), group );
radioJavaScript = new TQRadioButton( i18n("Insert a &JavaScript function"), group );
radioVariable->setChecked( true );
connect( radioVariable, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
connect( radioSTQLQuery, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
connect( radioSQLQuery, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
connect( radioJavaScript, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ) );
page2->addWidget( stackPage2 );
@ -265,7 +265,7 @@ void TokenDialog::accept()
else if( radioVariableExisting->isChecked() )
m_result = listVariable->currentText();
}
else if( radioSTQLQuery->isChecked() )
else if( radioSQLQuery->isChecked() )
m_result = TQString( "sqlquery:%2").tqarg( editQuery->text() );
else if( radioJavaScript->isChecked() )
m_result = TQString( "js:%2").tqarg( editJavaScript->text() );
@ -301,7 +301,7 @@ void TokenDialog::showPage( TQWidget* w )
{
if( radioVariable->isChecked() )
page3->raiseWidget( stack2Page3 );
else if( radioSTQLQuery->isChecked() )
else if( radioSQLQuery->isChecked() )
page3->raiseWidget( stack2Page4 );
else if( radioJavaScript->isChecked() )
{
@ -448,8 +448,8 @@ void TokenDialog::enableControls()
listVariable->isEnabled() && listVariable->currentItem() != -1 )
setFinishEnabled( page3, true );
buttonQuery->setEnabled( radioSTQLQuery->isChecked() && !editQuery->text().isEmpty() && SqlTables::isConnected() );
if( radioSTQLQuery->isChecked() && !editQuery->text().isEmpty() )
buttonQuery->setEnabled( radioSQLQuery->isChecked() && !editQuery->text().isEmpty() && SqlTables::isConnected() );
if( radioSQLQuery->isChecked() && !editQuery->text().isEmpty() )
setFinishEnabled( page3, true );
if( radioJavaScript->isChecked() && !editJavaScript->text().isEmpty() )

@ -87,7 +87,7 @@ class TokenDialog : public KWizard {
TQRadioButton* radioCustom;
TQRadioButton* radioAddress;
TQRadioButton* radioSTQLQuery;
TQRadioButton* radioSQLQuery;
TQRadioButton* radioVariable;
TQRadioButton* radioJavaScript;

Loading…
Cancel
Save