remaining snapshot porting

svn path=/trunk/KDE/kdebase/nsplugins/; revision=538638
This commit is contained in:
Aaron J. Seigo 2006-05-08 13:46:00 +00:00
parent 41672a2206
commit 8608f39856
13 changed files with 63 additions and 80 deletions

View file

@ -58,12 +58,9 @@
typedef KGenericFactory<KCMUserAccount, QWidget> Factory;
K_EXPORT_COMPONENT_FACTORY( kcm_useraccount, Factory("useraccount") )
KCMUserAccount::KCMUserAccount( QWidget *parent, const char *name,
const QStringList &)
KCMUserAccount::KCMUserAccount( QWidget *parent, const QStringList &)
: KCModule( Factory::instance(), parent)
{
Q_UNUSED(name);
QVBoxLayout *topLayout = new QVBoxLayout(this);
_mw = new MainWidget(this);
topLayout->addWidget( _mw );

View file

@ -43,8 +43,7 @@ class KCMUserAccount : public KCModule
Q_OBJECT
public:
KCMUserAccount(QWidget* parent, const char* name = "KCMUserAccount",
const QStringList& list=QStringList());
KCMUserAccount(QWidget* parent, const QStringList& list=QStringList());
~KCMUserAccount();
/**

View file

@ -34,31 +34,31 @@
#include <qclipboard.h>
#include <qpainter.h>
#include <klocale.h>
#include <dcopclient.h>
#include <dcopref.h>
#include <kdebug.h>
#include <kapplication.h>
#include <kaction.h>
#include <kstdaction.h>
#include <kedittoolbar.h>
#include <kfiledialog.h>
#include <kkeydialog.h>
#include <kmessagebox.h>
#include <kinputdialog.h>
#include <krun.h>
#include <kactioncollection.h>
#include <kdatastream.h>
#include <ktempfile.h>
#include <kedittoolbar.h>
#include <kicondialog.h>
#include <kiconloader.h>
#include <kinputdialog.h>
#include <kkeydialog.h>
#include <klocale.h>
#include <kstdaction.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <krun.h>
#include <kstandarddirs.h>
#include <ktempfile.h>
#include <ktoggleaction.h>
#include <kparts/part.h>
#include <kparts/componentfactory.h>
#include <kicondialog.h>
#include <kiconloader.h>
#include <kbookmark.h>
#include <kbookmarkmanager.h>
#include <kbookmarkimporter.h>

View file

@ -152,7 +152,7 @@ EditCommand::EditCommand(const QString & address, int col, const QString & newVa
if(mCol == 1)
{
KUrl u = KUrl::fromPathOrURL(newValue);
mNewValue = u.url(0);
mNewValue = u.url( KUrl::LeaveTrailingSlash );
}
else
mNewValue = newValue;
@ -235,7 +235,7 @@ void EditCommand::modify(QString newValue)
if(mCol == 1)
{
KUrl u = KUrl::fromPathOrURL(newValue);
mNewValue = u.url(0);
mNewValue = u.url( KUrl::LeaveTrailingSlash );
}
else
mNewValue = newValue;

View file

@ -37,24 +37,22 @@
#include <qlayout.h>
#include <qlabel.h>
#include <klocale.h>
#include <kdebug.h>
#include <kapplication.h>
#include <kstdaction.h>
#include <kaction.h>
#include <kactioncollection.h>
#include <ktoggleaction.h>
#include <kapplication.h>
#include <kbookmark.h>
#include <kbookmarkmanager.h>
#include <kdebug.h>
#include <kedittoolbar.h>
#include <kfiledialog.h>
#include <klineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kstdaction.h>
#include <dcopclient.h>
#include <dcopref.h>
#include <kedittoolbar.h>
#include <kmessagebox.h>
#include <klineedit.h>
#include <kfiledialog.h>
#include <kdebug.h>
#include <kbookmark.h>
#include <kbookmarkmanager.h>
#include <assert.h>
#include <qglobal.h>

View file

@ -242,7 +242,7 @@ void KfindDlg::slotDeleteItem(const QString& file)
iter=win->firstChild();
while( iter ) {
iterwithpath=query->url().path(+1)+iter->text(1)+iter->text(0);
iterwithpath=query->url().path(KUrl::AddTrailingSlash)+iter->text(1)+iter->text(0);
if(iterwithpath==file)
{
@ -260,12 +260,12 @@ void KfindDlg::slotNewItems( const QString& file )
Q3ListViewItem *checkiter;
QString checkiterwithpath;
if(file.indexOf(query->url().path(+1))==0)
if(file.indexOf(query->url().path(KUrl::AddTrailingSlash))==0)
{
kDebug()<<QString("Can be added, path OK")<<endl;
checkiter=win->firstChild();
while( checkiter ) {
checkiterwithpath=query->url().path(+1)+checkiter->text(1)+checkiter->text(0);
checkiterwithpath=query->url().path(KUrl::AddTrailingSlash)+checkiter->text(1)+checkiter->text(0);
if(file==checkiterwithpath)
return;
checkiter = checkiter->nextSibling();

View file

@ -33,19 +33,15 @@ class KonqDirPart;
typedef KParts::GenericFactory<KFindPart> KFindFactory;
K_EXPORT_COMPONENT_FACTORY( libkfindpart, KFindFactory )
KFindPart::KFindPart( QWidget * parentWidget, const char *widgetName,
QObject *parent, const char *name ,
const QStringList & /*args*/ )
KFindPart::KFindPart( QWidget * parentWidget, QObject *parent, const QStringList & /*args*/ )
: KonqDirPart (parent)/*KParts::ReadOnlyPart*/
{
setObjectName( name );
setInstance( KFindFactory::instance() );
setBrowserExtension( new KonqDirPartBrowserExtension( this ) );
kDebug() << "KFindPart::KFindPart " << this << endl;
m_kfindWidget = new Kfind( parentWidget, widgetName );
m_kfindWidget = new Kfind( parentWidget );
m_kfindWidget->setMaximumHeight(m_kfindWidget->minimumSizeHint().height());
const KFileItem *item = ((KonqDirPart*)parent)->currentItem();
kDebug() << "Kfind: currentItem: " << ( item ? item->url().path().toLocal8Bit() : QString("null") ) << endl;

View file

@ -44,8 +44,7 @@ class KFindPart : public KonqDirPart//KParts::ReadOnlyPart
Q_OBJECT
Q_PROPERTY( bool showsResult READ showsResult )
public:
KFindPart( QWidget * parentWidget, const char *widgetName,
QObject *parent, const char *name, const QStringList & /*args*/ );
KFindPart( QWidget * parentWidget, QObject *parent, const QStringList & /*args*/ );
virtual ~KFindPart();
static KAboutData *createAboutData();

View file

@ -159,7 +159,7 @@ QString KfindWindow::reducedDir(const QString& fullDir)
void KfindWindow::beginSearch(const KUrl& baseUrl)
{
kDebug()<<QString("beginSearch in: %1").arg(baseUrl.path())<<endl;
m_baseDir=baseUrl.path(+1);
m_baseDir=baseUrl.path(KUrl::AddTrailingSlash);
haveSelection = false;
clear();
}

View file

@ -187,7 +187,7 @@ void KQuery::processQuery( KFileItem* file)
while ( nextItem.hasNext() )
{
QRegExp *reg = nextItem.next();
matched = matched || ( reg == 0L ) || ( reg->exactMatch( file->url().fileName( true ) ) ) ;
matched = matched || ( reg == 0L ) || ( reg->exactMatch( file->url().fileName( KUrl::IgnoreTrailingSlash ) ) ) ;
}
if (!matched)

View file

@ -29,34 +29,32 @@
#include <kio/netaccess.h>
#include <kdeversion.h>
#include <kaboutapplication.h>
#include <dcopclient.h>
#include <kencodingfiledialog.h>
#include <kdiroperator.h>
#include <kiconloader.h>
#include <kaboutapplication.h>
#include <kaboutdata.h>
#include <kaction.h>
#include <kactioncollection.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kdeversion.h>
#include <kdiroperator.h>
#include <kedittoolbar.h>
#include <kencodingfiledialog.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <kkeydialog.h>
#include <klocale.h>
#include <kmenubar.h>
#include <kmessagebox.h>
#include <kparts/event.h>
#include <krecentfilesaction.h>
#include <kstatusbar.h>
#include <kstdaction.h>
#include <kaction.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kapplication.h>
#include <klocale.h>
#include <kurl.h>
#include <kconfig.h>
#include <kcmdlineargs.h>
#include <kmessagebox.h>
#include <kkeydialog.h>
#include <kedittoolbar.h>
#include <kparts/event.h>
#include <kmenubar.h>
#include <kiconloader.h>
#include <klocale.h>
#include <ksqueezedtextlabel.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kstringhandler.h>
#include <kurl.h>
#include <kxmlguifactory.h>
#include <QStackedWidget>

View file

@ -170,13 +170,12 @@ PluginFactory::~PluginFactory()
s_instance = 0;
}
KParts::Part * PluginFactory::createPartObject(QWidget *parentWidget, const char *widgetName,
QObject *parent, const char *name,
KParts::Part * PluginFactory::createPartObject(QWidget *parentWidget, QObject *parent,
const char *classname, const QStringList &args)
{
Q_UNUSED(classname)
kDebug(1432) << "PluginFactory::create" << endl;
KParts::Part *obj = new PluginPart(parentWidget, widgetName, parent, name, args);
KParts::Part *obj = new PluginPart(parentWidget, parent, args);
return obj;
}
@ -200,8 +199,7 @@ KAboutData *PluginFactory::aboutData()
/**************************************************************************/
PluginPart::PluginPart(QWidget *parentWidget, const char *widgetName, QObject *parent,
const char*, const QStringList &args)
PluginPart::PluginPart(QWidget *parentWidget, QObject *parent, const QStringList &args)
: KParts::ReadOnlyPart(parent), _widget(0), _args(args),
_destructed(0L)
{
@ -228,7 +226,6 @@ PluginPart::PluginPart(QWidget *parentWidget, const char *widgetName, QObject *p
// create a canvas to insert our widget
_canvas = new PluginCanvasWidget( parentWidget );
_canvas->setObjectName( widgetName );
//_canvas->setFocusPolicy( QWidget::ClickFocus );
_canvas->setFocusPolicy( Qt::WheelFocus );
setWidget(_canvas);

View file

@ -67,8 +67,7 @@ public:
PluginFactory();
virtual ~PluginFactory();
virtual KParts::Part * createPartObject(QWidget *parentWidget = 0, const char *widgetName = 0,
QObject *parent = 0, const char *name = 0,
virtual KParts::Part * createPartObject(QWidget *parentWidget = 0, QObject *parent = 0,
const char *classname = "KParts::Part",
const QStringList &args = QStringList());
@ -102,8 +101,8 @@ class PluginPart: public KParts::ReadOnlyPart
{
Q_OBJECT
public:
PluginPart(QWidget *parentWidget, const char *widgetName, QObject *parent,
const char *name, const QStringList &args = QStringList());
PluginPart(QWidget *parentWidget, QObject *parent,
const QStringList &args = QStringList());
virtual ~PluginPart();
void postURL(const QString& url, const QString& target, const QByteArray& data, const QString& mime);