summaryrefslogtreecommitdiffstats
path: root/kio/kfile/tests
diff options
context:
space:
mode:
Diffstat (limited to 'kio/kfile/tests')
-rw-r--r--kio/kfile/tests/Makefile.am41
-rw-r--r--kio/kfile/tests/kcustommenueditortest.cpp19
-rw-r--r--kio/kfile/tests/kdirselectdialogtest.cpp17
-rw-r--r--kio/kfile/tests/kfdtest.cpp34
-rw-r--r--kio/kfile/tests/kfdtest.h28
-rw-r--r--kio/kfile/tests/kfiletreeviewtest.cpp165
-rw-r--r--kio/kfile/tests/kfiletreeviewtest.h42
-rw-r--r--kio/kfile/tests/kfstest.cpp183
-rw-r--r--kio/kfile/tests/kicondialogtest.cpp19
-rw-r--r--kio/kfile/tests/knotifytest.cpp10
-rw-r--r--kio/kfile/tests/kopenwithtest.cpp67
-rw-r--r--kio/kfile/tests/kurlrequestertest.cpp16
12 files changed, 0 insertions, 641 deletions
diff --git a/kio/kfile/tests/Makefile.am b/kio/kfile/tests/Makefile.am
deleted file mode 100644
index 9689f7a27..000000000
--- a/kio/kfile/tests/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-# This file is part of the KDE libraries
-# Copyright (C) 1996-1997 Matthias Kalle Dalheimer (kalle@kde.org)
-# (C) 1997-1998 Stephan Kulow (coolo@kde.org)
-
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-
-# You should have received a copy of the GNU Library General Public License
-# along with this library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
-
-INCLUDES = $(all_includes)
-
-AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH)
-
-check_PROGRAMS = kfstest kurlrequestertest kfiletreeviewtest \
- kopenwithtest kdirselectdialogtest kicondialogtest \
- knotifytest kcustommenueditortest
-
-# noinst_HEADERS =
-
-METASOURCES = AUTO
-
-LDADD = $(LIB_KIO)
-kcustommenueditortest_SOURCES = kcustommenueditortest.cpp
-kurlrequestertest_SOURCES = kurlrequestertest.cpp
-kfstest_SOURCES = kfstest.cpp kfdtest.cpp
-kfiletreeviewtest_SOURCES = kfiletreeviewtest.cpp
-kopenwithtest_SOURCES = kopenwithtest.cpp
-kdirselectdialogtest_SOURCES = kdirselectdialogtest.cpp
-kicondialogtest_SOURCES = kicondialogtest.cpp
-knotifytest_SOURCES = knotifytest.cpp
-
diff --git a/kio/kfile/tests/kcustommenueditortest.cpp b/kio/kfile/tests/kcustommenueditortest.cpp
deleted file mode 100644
index 1fc6da496..000000000
--- a/kio/kfile/tests/kcustommenueditortest.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "kcustommenueditor.h"
-#include <kapplication.h>
-#include <klocale.h>
-#include <kconfig.h>
-
-int main(int argc, char** argv)
-{
- KLocale::setMainCatalogue("tdelibs");
- TDEApplication app(argc, argv, "KCustomMenuEditorTest");
- KCustomMenuEditor editor(0);
- TDEConfig *cfg = new TDEConfig("kdesktop_custom_menu2");
- editor.load(cfg);
- if (editor.exec())
- {
- editor.save(cfg);
- cfg->sync();
- }
-}
-
diff --git a/kio/kfile/tests/kdirselectdialogtest.cpp b/kio/kfile/tests/kdirselectdialogtest.cpp
deleted file mode 100644
index 3d15c47d0..000000000
--- a/kio/kfile/tests/kdirselectdialogtest.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <kapplication.h>
-#include <kdirselectdialog.h>
-#include <kmessagebox.h>
-#include <kurl.h>
-
-int main( int argc, char **argv )
-{
- TDEApplication app(argc, argv, "kdirselectdialogtest");
-
- KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null );
- if ( u.isValid() )
- KMessageBox::information( 0L,
- TQString::fromLatin1("You selected the url: %1")
- .arg( u.prettyURL() ), "Selected URL" );
-
- return 0;
-}
diff --git a/kio/kfile/tests/kfdtest.cpp b/kio/kfile/tests/kfdtest.cpp
deleted file mode 100644
index 867b9b4a8..000000000
--- a/kio/kfile/tests/kfdtest.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "kfdtest.h"
-
-#include <tqstringlist.h>
-#include <kfiledialog.h>
-#include <kapplication.h>
-#include <kmessagebox.h>
-#include <tqtimer.h>
-
-KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name )
- : TQObject( parent, name ),
- m_startDir( startDir )
-{
- TQTimer::singleShot( 1000, this, TQT_SLOT( doit() ));
-}
-
-void KFDTest::doit()
-{
- KFileDialog *dlg = new KFileDialog( m_startDir, TQString::null, 0L,
- "file dialog", true );
- dlg->setMode( KFile::File);
- dlg->setOperationMode( KFileDialog::Saving );
- TQStringList filter;
- filter << "all/allfiles" << "text/plain";
- dlg->setMimeFilter( filter, "all/allfiles" );
-
- if ( dlg->exec() == KDialog::Accepted )
- {
- KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
- }
-
-// tqApp->quit();
-}
-
-#include "kfdtest.moc"
diff --git a/kio/kfile/tests/kfdtest.h b/kio/kfile/tests/kfdtest.h
deleted file mode 100644
index 6c59550b8..000000000
--- a/kio/kfile/tests/kfdtest.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************************
-** $Id$
-**
-** Copyright (C) 2003 Carsten Pfeiffer <pfeiffer@kde.org>
-**
-****************************************************************************/
-
-#ifndef KFDTEST_H
-#define KFDTEST_H
-
-#include <tqobject.h>
-
-class KFDTest : public TQObject
-{
- Q_OBJECT
-
-public:
- KFDTest( const TQString& startDir, TQObject *parent = 0, const char *name = 0);
-
-public slots:
- void doit();
-
-private:
- TQString m_startDir;
-};
-
-
-#endif // KFDTEST_H
diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp
deleted file mode 100644
index cf28557f8..000000000
--- a/kio/kfile/tests/kfiletreeviewtest.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Klaas Freitag <freitag@suse.de>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include <tqdir.h>
-
-#include <kglobal.h>
-#include <kiconloader.h>
-#include <kmainwindow.h>
-#include <kapplication.h>
-#include <kurl.h>
-#include <kdebug.h>
-#include <kstatusbar.h>
-
-#include <kfiletreeview.h>
-#include "kfiletreeviewtest.h"
-
-
-#include "kfiletreeviewtest.moc"
-
-testFrame::testFrame():KMainWindow(0,"Test FileTreeView"),
- dirOnlyMode(false)
-
-{
- treeView = new KFileTreeView( this );
- treeView->setDragEnabled( true );
- treeView->setAcceptDrops( true );
- treeView->setDropVisualizer( true );
-
-
- /* Connect to see the status bar */
- KStatusBar* sta = statusBar();
- connect( treeView, TQT_SIGNAL( onItem( const TQString& )),
- sta, TQT_SLOT( message( const TQString& )));
-
- connect( treeView, TQT_SIGNAL( dropped( TQWidget*, TQDropEvent*, KURL::List& )),
- this, TQT_SLOT( urlsDropped( TQWidget*, TQDropEvent*, KURL::List& )));
-
- connect( treeView, TQT_SIGNAL( dropped( KURL::List&, KURL& )), this,
- TQT_SLOT( copyURLs( KURL::List&, KURL& )));
-
- treeView->addColumn( "File" );
- treeView->addColumn( "ChildCount" );
- setCentralWidget( treeView );
- resize( 600, 400 );
-
- showPath( KURL::fromPathOrURL( TQDir::homeDirPath() ));
-}
-
-void testFrame::showPath( const KURL &url )
-{
- TQString fname = "TestBranch"; // url.fileName ();
- /* try a user icon */
- KIconLoader *loader = TDEGlobal::iconLoader();
- TQPixmap pix = loader->loadIcon( "contents2", KIcon::Small );
- TQPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small );
-
- KFileTreeBranch *nb = treeView->addBranch( url, fname, pix );
-
- if( nb )
- {
- if( dirOnlyMode ) treeView->setDirOnlyMode( nb, true );
- nb->setOpenPixmap( pixOpen );
-
- connect( nb, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)),
- this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*)));
- connect( nb, TQT_SIGNAL( directoryChildCount( KFileTreeViewItem *, int )),
- this, TQT_SLOT( slotSetChildCount( KFileTreeViewItem*, int )));
- // nb->setChildRecurse(false );
-
- nb->setOpen(true);
- }
-
-
-}
-
-void testFrame::urlsDropped( TQWidget* , TQDropEvent* , KURL::List& list )
-{
- KURL::List::ConstIterator it = list.begin();
- for ( ; it != list.end(); ++it ) {
- kdDebug() << "Url dropped: " << (*it).prettyURL() << endl;
- }
-}
-
-void testFrame::copyURLs( KURL::List& list, KURL& to )
-{
- KURL::List::ConstIterator it = list.begin();
- kdDebug() << "Copy to " << to.prettyURL() << endl;
- for ( ; it != list.end(); ++it ) {
- kdDebug() << "Url: " << (*it).prettyURL() << endl;
- }
-
-}
-
-
-void testFrame::slotPopulateFinished(KFileTreeViewItem *item )
-{
- if( item )
- {
-#if 0
- int cc = item->childCount();
-
- kdDebug() << "setting column 2 of treeview with count " << cc << endl;
-
- item->setText( 1, TQString::number( cc ));
-#endif
- }
- else
- {
- kdDebug() << "slotPopFinished for uninitalised item" << endl;
- }
-}
-
-void testFrame::slotSetChildCount( KFileTreeViewItem *item, int c )
-{
- if( item )
- item->setText(1, TQString::number( c ));
-}
-
-int main(int argc, char **argv)
-{
- TDEApplication a(argc, argv, "kfiletreeviewtest");
- TQString name1;
- TQStringList names;
-
- TQString argv1;
- testFrame *tf;
-
- tf = new testFrame();
- a.setMainWidget( tf );
-
- if (argc > 1)
- {
- for( int i = 1; i < argc; i++ )
- {
- argv1 = TQString::fromLatin1(argv[i]);
- kdDebug() << "Opening " << argv1 << endl;
- if( argv1 == "-d" )
- tf->setDirOnly();
- else
- {
- KURL u( argv1 );
- tf->showPath( u );
- }
- }
- }
- tf->show();
- int ret = a.exec();
- return( ret );
-}
diff --git a/kio/kfile/tests/kfiletreeviewtest.h b/kio/kfile/tests/kfiletreeviewtest.h
deleted file mode 100644
index 4ae791ce5..000000000
--- a/kio/kfile/tests/kfiletreeviewtest.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2001 Klaas Freitag <freitag@suse.de>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef KFILETREEVIEWTEST
-#define KFILETREEVIEWTEST
-
-class testFrame: public KMainWindow
-{
- Q_OBJECT
-public:
- testFrame();
- void showPath( const KURL & );
- void setDirOnly( ) { dirOnlyMode = true; }
-public slots:
- void slotPopulateFinished(KFileTreeViewItem *);
- void slotSetChildCount( KFileTreeViewItem *item, int c );
-
- void urlsDropped( TQWidget*, TQDropEvent*, KURL::List& );
- void copyURLs( KURL::List& list, KURL& to );
-private:
- KFileTreeView *treeView;
- bool dirOnlyMode;
-};
-
-
-#endif
diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp
deleted file mode 100644
index b0ecabcc6..000000000
--- a/kio/kfile/tests/kfstest.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 1997, 1998 Richard Moore <rich@kde.org>
- 1998 Stephan Kulow <coolo@kde.org>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <tqdir.h>
-#include <tqlayout.h>
-#include <tqstringlist.h>
-#include <tqwidget.h>
-
-#include <kfiledialog.h>
-#include <kfileiconview.h>
-#include <kmessagebox.h>
-#include <kconfig.h>
-#include <kapplication.h>
-#include <kurl.h>
-#include <kurlbar.h>
-#include <kdiroperator.h>
-#include <kfile.h>
-#include <kdebug.h>
-#include <kicondialog.h>
-
-#include "kfdtest.h"
-
-int main(int argc, char **argv)
-{
- TDEApplication a(argc, argv, "kfstest");
- TQString name1;
- TQStringList names;
-
- TQString argv1;
- TQString startDir;
- if (argc > 1)
- argv1 = TQString::fromLatin1(argv[1]);
- if ( argc > 2 )
- startDir = TQString::fromLatin1( argv[2]);
-
- if (argv1 == TQString::fromLatin1("diroperator")) {
- KDirOperator *op = new KDirOperator(startDir, 0, "operator");
- op->setViewConfig( TDEGlobal::config(), "TestGroup" );
- op->setView(KFile::Simple);
- op->show();
- a.setMainWidget(op);
- a.exec();
- }
-
- else if (argv1 == TQString::fromLatin1("justone")) {
- TQString name = KFileDialog::getOpenFileName(startDir);
- tqDebug("filename=%s",name.latin1());
- }
-
- else if (argv1 == TQString::fromLatin1("existingURL")) {
- KURL url = KFileDialog::getExistingURL();
- tqDebug("URL=%s",url.url().latin1());
- name1 = url.url();
- }
-
- else if (argv1 == TQString::fromLatin1("preview")) {
- KURL u = KFileDialog::getImageOpenURL();
- tqDebug("filename=%s", u.url().latin1());
- }
-
- else if (argv1 == TQString::fromLatin1("preselect")) {
- names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd"));
- TQStringList::Iterator it = names.begin();
- while ( it != names.end() ) {
- tqDebug("selected file: %s", (*it).latin1());
- ++it;
- }
- }
-
- else if (argv1 == TQString::fromLatin1("dirs"))
- name1 = KFileDialog::getExistingDirectory();
-
- else if (argv1 == TQString::fromLatin1("heap")) {
- KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L,
- "file dialog", true );
- dlg->setMode( KFile::File);
- dlg->setOperationMode( KFileDialog::Saving );
- TQStringList filter;
- filter << "all/allfiles" << "text/plain";
- dlg->setMimeFilter( filter, "all/allfiles" );
- KURLBar *urlBar = dlg->speedBar();
- if ( urlBar )
- {
- urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"),
- TQString::fromLatin1("KDE FTP Server") );
- }
-
- if ( dlg->exec() == KDialog::Accepted )
- name1 = dlg->selectedURL().url();
- }
-
- else if ( argv1 == TQString::fromLatin1("eventloop") )
- {
- KFDTest *test = new KFDTest( startDir );
- return a.exec();
- }
-
- else if (argv1 == TQString::fromLatin1("save")) {
- KURL u = KFileDialog::getSaveURL();
-// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")),
-// TQString::null, 0L);
- name1 = u.url();
- }
-
- else if (argv1 == TQString::fromLatin1("icon")) {
- KIconDialog dlg;
- TQString icon = dlg.selectIcon();
- kdDebug() << icon << endl;
- }
-
-// else if ( argv1 == TQString::fromLatin1("dirselect") ) {
-// KURL url;
-// url.setPath( "/" );
-// KURL selected = KDirSelectDialog::selectDirectory( url );
-// name1 = selected.url();
-// tqDebug("*** selected: %s", selected.url().latin1());
-// }
-
- else {
- KFileDialog dlg(startDir,
- TQString::fromLatin1("*|All Files\n"
- "*.lo *.o *.la|All libtool Files"),
- 0, 0, true);
-// dlg.setFilter( "*.tdevelop" );
- dlg.setMode( (KFile::Mode) (KFile::Files |
- KFile::Directory |
- KFile::ExistingOnly |
- KFile::LocalOnly) );
-// TQStringList filter;
-// filter << "text/plain" << "text/html" << "image/png";
-// dlg.setMimeFilter( filter );
-// KMimeType::List types;
-// types.append( KMimeType::mimeType( "text/plain" ) );
-// types.append( KMimeType::mimeType( "text/html" ) );
-// dlg.setFilterMimeType( "Filetypes:", types, types.first() );
- if ( dlg.exec() == TQDialog::Accepted ) {
- KURL::List list = dlg.selectedURLs();
- KURL::List::ConstIterator it = list.begin();
- tqDebug("*** selectedURLs(): ");
- while ( it != list.end() ) {
- name1 = (*it).url();
- tqDebug(" -> %s", name1.latin1());
- ++it;
- }
- tqDebug("*** selectedFile: %s", dlg.selectedFile().latin1());
- tqDebug("*** selectedURL: %s", dlg.selectedURL().url().latin1());
- tqDebug("*** selectedFiles: ");
- TQStringList l = dlg.selectedFiles();
- TQStringList::Iterator it2 = l.begin();
- while ( it2 != l.end() ) {
- tqDebug(" -> %s", (*it2).latin1());
- ++it2;
- }
- }
- }
-
- if (!(name1.isNull()))
- KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1,
- TQString::fromLatin1("Your Choice"));
- return 0;
-}
diff --git a/kio/kfile/tests/kicondialogtest.cpp b/kio/kfile/tests/kicondialogtest.cpp
deleted file mode 100644
index b2c56e159..000000000
--- a/kio/kfile/tests/kicondialogtest.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <kapplication.h>
-#include <kicondialog.h>
-
-int main( int argc, char **argv )
-{
- TDEApplication app( argc, argv, "kicondialogtest" );
-
-// KIconDialog::getIcon();
-
- KIconButton button;
- app.setMainWidget( &button );
- button.show();
-
-
- return app.exec();
-}
-
-/* vim: et sw=4
- */
diff --git a/kio/kfile/tests/knotifytest.cpp b/kio/kfile/tests/knotifytest.cpp
deleted file mode 100644
index 0493b59b4..000000000
--- a/kio/kfile/tests/knotifytest.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <kapplication.h>
-#include <knotifydialog.h>
-
-int main( int argc, char **argv )
-{
- TDEApplication app( argc, argv, "knotifytest" );
- KNotifyDialog *dlg = new KNotifyDialog();
- dlg->addApplicationEvents( "twin" );
- return dlg->exec();
-}
diff --git a/kio/kfile/tests/kopenwithtest.cpp b/kio/kfile/tests/kopenwithtest.cpp
deleted file mode 100644
index f78b1830b..000000000
--- a/kio/kfile/tests/kopenwithtest.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/* This file is part of the KDE libraries
- Copyright (C) 2002 Dirk Mueller <mueller@kde.org>
- Copyright (C) 2003 David Faure <faure@kde.org>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include <kapplication.h>
-#include <tqwidget.h>
-#include <tqstringlist.h>
-#include <tqdir.h>
-#include <kopenwith.h>
-#include <kurl.h>
-#include <kdebug.h>
-
-int main(int argc, char **argv)
-{
- TDEApplication app(argc, argv, "kopenwithtest");
- KURL::List list;
-
- list += KURL("file:///tmp/testfile.txt");
-
- // Test with one URL
- KOpenWithDlg* dlg = new KOpenWithDlg(list, "OpenWith_Text", "OpenWith_Value", 0);
- if(dlg->exec()) {
- kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl;
- }
- else
- kdDebug() << "Dialog was canceled." << endl;
- delete dlg;
-
- // Test with two URLs
- list += KURL("http://www.kde.org/index.html");
- dlg = new KOpenWithDlg(list, "OpenWith_Text", "OpenWith_Value", 0);
- if(dlg->exec()) {
- kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl;
- }
- else
- kdDebug() << "Dialog was canceled." << endl;
- delete dlg;
-
- // Test with a mimetype
- TQString mimetype = "text/plain";
- dlg = new KOpenWithDlg( mimetype, "kedit", 0);
- if(dlg->exec()) {
- kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl;
- }
- else
- kdDebug() << "Dialog was canceled." << endl;
- delete dlg;
-
- return 0;
-}
-
diff --git a/kio/kfile/tests/kurlrequestertest.cpp b/kio/kfile/tests/kurlrequestertest.cpp
deleted file mode 100644
index 0e4851cfb..000000000
--- a/kio/kfile/tests/kurlrequestertest.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <kapplication.h>
-#include <keditlistbox.h>
-#include <kurlrequester.h>
-#include <kurlrequesterdlg.h>
-
-int main( int argc, char **argv )
-{
- TDEApplication app( argc, argv, "kurlrequestertest" );
- KURL url = KURLRequesterDlg::getURL( "ftp://ftp.kde.org" );
- tqDebug( "Selected url: %s", url.url().latin1());
-
- KURLRequester *req = new KURLRequester();
- KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() );
- el->show();
- return app.exec();
-}