• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeparts
 

tdeparts

  • tdeparts
browserrun.cpp
1/* This file is part of the KDE project
2 *
3 * Copyright (C) 2002 David Faure <faure@kde.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License version 2, as published by the Free Software Foundation.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU Library General Public License
14 * along with this library; see the file COPYING.LIB. If not, write to
15 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 */
18
19#include "browserrun.h"
20#include <tdemessagebox.h>
21#include <tdefiledialog.h>
22#include <tdeio/job.h>
23#include <tdeio/scheduler.h>
24#include <tdelocale.h>
25#include <tdeprocess.h>
26#include <kstringhandler.h>
27#include <kuserprofile.h>
28#include <tdetempfile.h>
29#include <kdebug.h>
30#include <tdestandarddirs.h>
31#include <assert.h>
32
33using namespace KParts;
34
35class BrowserRun::BrowserRunPrivate
36{
37public:
38 bool m_bHideErrorDialog;
39 TQString contentDisposition;
40};
41
42BrowserRun::BrowserRun( const KURL& url, const KParts::URLArgs& args,
43 KParts::ReadOnlyPart *part, TQWidget* window,
44 bool removeReferrer, bool trustedSource )
45 : KRun( url, window, 0 /*mode*/, false /*is_local_file known*/, false /* no GUI */ ),
46 m_args( args ), m_part( part ), m_window( window ),
47 m_bRemoveReferrer( removeReferrer ), m_bTrustedSource( trustedSource )
48{
49 d = new BrowserRunPrivate;
50 d->m_bHideErrorDialog = false;
51}
52
53// BIC: merge with above ctor
54BrowserRun::BrowserRun( const KURL& url, const KParts::URLArgs& args,
55 KParts::ReadOnlyPart *part, TQWidget* window,
56 bool removeReferrer, bool trustedSource, bool hideErrorDialog )
57 : KRun( url, window, 0 /*mode*/, false /*is_local_file known*/, false /* no GUI */ ),
58 m_args( args ), m_part( part ), m_window( window ),
59 m_bRemoveReferrer( removeReferrer ), m_bTrustedSource( trustedSource )
60{
61 d = new BrowserRunPrivate;
62 d->m_bHideErrorDialog = hideErrorDialog;
63}
64
65BrowserRun::~BrowserRun()
66{
67 delete d;
68}
69
70void BrowserRun::init()
71{
72 if ( d->m_bHideErrorDialog )
73 {
74 // ### KRun doesn't call a virtual method when it finds out that the URL
75 // is either malformed, or points to a non-existing local file...
76 // So we need to reimplement some of the checks, to handle m_bHideErrorDialog
77 if ( !m_strURL.isValid() ) {
78 redirectToError( TDEIO::ERR_MALFORMED_URL, m_strURL.url() );
79 return;
80 }
81 if ( !m_bIsLocalFile && !m_bFault && m_strURL.isLocalFile() )
82 m_bIsLocalFile = true;
83
84 if ( m_bIsLocalFile ) {
85 struct stat buff;
86 if ( stat( TQFile::encodeName(m_strURL.path()), &buff ) == -1 )
87 {
88 kdDebug(1000) << "BrowserRun::init : " << m_strURL.prettyURL() << " doesn't exist." << endl;
89 redirectToError( TDEIO::ERR_DOES_NOT_EXIST, m_strURL.path() );
90 return;
91 }
92 m_mode = buff.st_mode; // while we're at it, save it for KRun::init() to use it
93 }
94 }
95 KRun::init();
96}
97
98void BrowserRun::scanFile()
99{
100 kdDebug(1000) << "BrowserRun::scanfile " << m_strURL.prettyURL() << endl;
101
102 // Let's check for well-known extensions
103 // Not when there is a query in the URL, in any case.
104 // Optimization for http/https, findByURL doesn't trust extensions over http.
105 if ( m_strURL.query().isEmpty() && !m_strURL.protocol().startsWith("http") )
106 {
107 KMimeType::Ptr mime = KMimeType::findByURL( m_strURL );
108 assert( mime != 0L );
109 if ( mime->name() != "application/octet-stream" || m_bIsLocalFile )
110 {
111 kdDebug(1000) << "Scanfile: MIME TYPE is " << mime->name() << endl;
112 foundMimeType( mime->name() );
113 return;
114 }
115 }
116
117 if ( m_part )
118 {
119 TQString proto = m_part->url().protocol().lower();
120
121 if (proto == "https" || proto == "webdavs") {
122 m_args.metaData().insert("main_frame_request", "TRUE" );
123 m_args.metaData().insert("ssl_was_in_use", "TRUE" );
124 m_args.metaData().insert("ssl_activate_warnings", "TRUE" );
125 } else if (proto == "http" || proto == "webdav") {
126 m_args.metaData().insert("ssl_activate_warnings", "TRUE" );
127 m_args.metaData().insert("ssl_was_in_use", "FALSE" );
128 }
129
130 // Set the PropagateHttpHeader meta-data if it has not already been set...
131 if (!m_args.metaData().contains("PropagateHttpHeader"))
132 m_args.metaData().insert("PropagateHttpHeader", "TRUE");
133 }
134
135 TDEIO::TransferJob *job;
136 if ( m_args.doPost() && m_strURL.protocol().startsWith("http"))
137 {
138 job = TDEIO::http_post( m_strURL, m_args.postData, false );
139 job->addMetaData( "content-type", m_args.contentType() );
140 }
141 else
142 job = TDEIO::get(m_strURL, m_args.reload, false);
143
144 if ( m_bRemoveReferrer )
145 m_args.metaData().remove("referrer");
146
147 job->addMetaData( m_args.metaData() );
148 job->setWindow( m_window );
149 connect( job, TQ_SIGNAL( result( TDEIO::Job *)),
150 this, TQ_SLOT( slotBrowserScanFinished(TDEIO::Job *)));
151 connect( job, TQ_SIGNAL( mimetype( TDEIO::Job *, const TQString &)),
152 this, TQ_SLOT( slotBrowserMimetype(TDEIO::Job *, const TQString &)));
153 m_job = job;
154}
155
156void BrowserRun::slotBrowserScanFinished(TDEIO::Job *job)
157{
158 kdDebug(1000) << "BrowserRun::slotBrowserScanFinished" << endl;
159 if ( job->error() == TDEIO::ERR_IS_DIRECTORY )
160 {
161 // It is in fact a directory. This happens when HTTP redirects to FTP.
162 // Due to the "protocol doesn't support listing" code in BrowserRun, we
163 // assumed it was a file.
164 kdDebug(1000) << "It is in fact a directory!" << endl;
165 // Update our URL in case of a redirection
166 m_strURL = static_cast<TDEIO::TransferJob *>(job)->url();
167 m_job = 0;
168 foundMimeType( "inode/directory" );
169 }
170 else
171 {
172 if ( job->error() )
173 handleError( job );
174 else
175 KRun::slotScanFinished(job);
176 }
177}
178
179void BrowserRun::slotBrowserMimetype( TDEIO::Job *_job, const TQString &type )
180{
181 Q_ASSERT( _job == m_job );
182 TDEIO::TransferJob *job = static_cast<TDEIO::TransferJob *>(m_job);
183 // Update our URL in case of a redirection
184 //kdDebug(1000) << "old URL=" << m_strURL.url() << endl;
185 //kdDebug(1000) << "new URL=" << job->url().url() << endl;
186 m_strURL = job->url();
187 kdDebug(1000) << "slotBrowserMimetype: found " << type << " for " << m_strURL.prettyURL() << endl;
188
189 m_suggestedFilename = job->queryMetaData("content-disposition-filename");
190 d->contentDisposition = job->queryMetaData("content-disposition-type");
191 //kdDebug(1000) << "m_suggestedFilename=" << m_suggestedFilename << endl;
192
193 // Make a copy to avoid a dead reference
194 TQString _type = type;
195 job->putOnHold();
196 m_job = 0;
197
198 KRun::setSuggestedFileName(m_suggestedFilename);
199
200 foundMimeType( _type );
201}
202
203BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const TQString& _mimeType )
204{
205 TQString mimeType( _mimeType );
206 Q_ASSERT( !m_bFinished ); // only come here if the mimetype couldn't be embedded
207 // Support for saving remote files.
208 if ( mimeType != "inode/directory" && // dirs can't be saved
209 !m_strURL.isLocalFile() )
210 {
211 if ( isTextExecutable(mimeType) )
212 mimeType = TQString::fromLatin1("text/plain"); // view, don't execute
213 kdDebug(1000) << "BrowserRun: ask for saving" << endl;
214 KService::Ptr offer = KServiceTypeProfile::preferredService(mimeType, "Application");
215 // ... -> ask whether to save
216 KParts::BrowserRun::AskSaveResult res = askSave( m_strURL, offer, mimeType, m_suggestedFilename );
217 if ( res == KParts::BrowserRun::Save ) {
218 save( m_strURL, m_suggestedFilename );
219 kdDebug(1000) << "BrowserRun::handleNonEmbeddable: Save: returning Handled" << endl;
220 m_bFinished = true;
221 return Handled;
222 }
223 else if ( res == KParts::BrowserRun::Cancel ) {
224 // saving done or canceled
225 kdDebug(1000) << "BrowserRun::handleNonEmbeddable: Cancel: returning Handled" << endl;
226 m_bFinished = true;
227 return Handled;
228 }
229 else // "Open" chosen (done by KRun::foundMimeType, called when returning NotHandled)
230 {
231 // If we were in a POST, we can't just pass a URL to an external application.
232 // We must save the data to a tempfile first.
233 if ( m_args.doPost() )
234 {
235 kdDebug(1000) << "BrowserRun: request comes from a POST, can't pass a URL to another app, need to save" << endl;
236 m_sMimeType = mimeType;
237 TQString extension;
238 TQString fileName = m_suggestedFilename.isEmpty() ? m_strURL.fileName() : m_suggestedFilename;
239 int extensionPos = fileName.findRev( '.' );
240 if ( extensionPos != -1 )
241 extension = fileName.mid( extensionPos ); // keep the '.'
242 KTempFile tempFile( TQString::null, extension );
243 KURL destURL;
244 destURL.setPath( tempFile.name() );
245 TDEIO::Job *job = TDEIO::file_copy( m_strURL, destURL, 0600, true /*overwrite*/, false /*no resume*/, true /*progress info*/ );
246 job->setWindow (m_window);
247 connect( job, TQ_SIGNAL( result( TDEIO::Job *)),
248 this, TQ_SLOT( slotCopyToTempFileResult(TDEIO::Job *)) );
249 return Delayed; // We'll continue after the job has finished
250 }
251 }
252 }
253
254 // Check if running is allowed
255 if ( !m_bTrustedSource && // ... and untrusted source...
256 !allowExecution( mimeType, m_strURL ) ) // ...and the user said no (for executables etc.)
257 {
258 m_bFinished = true;
259 return Handled;
260 }
261
262 TDEIO::SimpleJob::removeOnHold(); // Kill any slave that was put on hold.
263 return NotHandled;
264}
265
266//static
267bool BrowserRun::allowExecution( const TQString &serviceType, const KURL &url )
268{
269 if ( !isExecutable( serviceType ) )
270 return true;
271
272 if ( !url.isLocalFile() ) // Don't permit to execute remote files
273 return false;
274
275 return ( KMessageBox::warningContinueCancel( 0, i18n( "Do you really want to execute '%1'? " ).arg( url.prettyURL() ),
276 i18n("Execute File?"), i18n("Execute") ) == KMessageBox::Continue );
277}
278
279static TQString makeQuestion( const KURL& url, const TQString& mimeType, const TQString& suggestedFilename )
280{
281 TQString surl = KStringHandler::csqueeze( url.prettyURL() );
282 KMimeType::Ptr mime = KMimeType::mimeType( mimeType );
283 TQString comment = mimeType;
284
285 // Test if the mimeType is not recognize as octet-stream.
286 // If so then keep mime-type as comment
287 if (mime->name() != KMimeType::defaultMimeType()) {
288 // The mime-type is known so display the comment instead of mime-type
289 comment = mime->comment();
290 }
291 // The strange order in the i18n() calls below is due to the possibility
292 // of surl containing a '%'
293 if ( suggestedFilename.isEmpty() )
294 return i18n("Open '%2'?\nType: %1").arg(comment, surl);
295 else
296 return i18n("Open '%3'?\nName: %2\nType: %1").arg(comment, suggestedFilename, surl);
297}
298
299//static
300BrowserRun::AskSaveResult BrowserRun::askSave( const KURL & url, KService::Ptr offer, const TQString& mimeType, const TQString & suggestedFilename )
301{
302 // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
303 // NOTE: Keep this function in sync with tdebase/kcontrol/filetypes/filetypedetails.cpp
304 // FileTypeDetails::updateAskSave()
305
306 TQString question = makeQuestion( url, mimeType, suggestedFilename );
307
308 // Text used for the open button
309 TQString openText = (offer && !offer->name().isEmpty())
310 ? i18n("&Open with '%1'").arg(offer->name())
311 : i18n("&Open With...");
312
313 int choice = KMessageBox::questionYesNoCancel(
314 0L, question, url.host(),
315 KStdGuiItem::saveAs(), openText,
316 TQString::fromLatin1("askSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
317
318 return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel );
319 // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
320}
321
322//static
323BrowserRun::AskSaveResult BrowserRun::askEmbedOrSave( const KURL & url, const TQString& mimeType, const TQString & suggestedFilename, int flags )
324{
325 // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
326 // NOTE: Keep this funcion in sync with tdebase/kcontrol/filetypes/filetypedetails.cpp
327 // FileTypeDetails::updateAskSave()
328
329 KMimeType::Ptr mime = KMimeType::mimeType( mimeType );
330 // Don't ask for:
331 // - html (even new tabs would ask, due to about:blank!)
332 // - dirs obviously (though not common over HTTP :),
333 // - images (reasoning: no need to save, most of the time, because fast to see)
334 // e.g. postscript is different, because takes longer to read, so
335 // it's more likely that the user might want to save it.
336 // - multipart/* ("server push", see tdemultipart)
337 // - other strange 'internal' mimetypes like print/manager...
338 // KEEP IN SYNC!!!
339 if (flags != (int)AttachmentDisposition && (
340 mime->is( "text/html" ) ||
341 mime->is( "text/xml" ) ||
342 mime->is( "inode/directory" ) ||
343 mimeType.startsWith( "image" ) ||
344 mime->is( "multipart/x-mixed-replace" ) ||
345 mime->is( "multipart/replace" ) ||
346 mimeType.startsWith( "print" ) ) )
347 return Open;
348
349 TQString question = makeQuestion( url, mimeType, suggestedFilename );
350
351 int choice = KMessageBox::questionYesNoCancel(
352 0L, question, url.host(),
353 KStdGuiItem::saveAs(), KGuiItem( i18n( "&Open" ), "document-open"),
354 TQString::fromLatin1("askEmbedOrSave")+ mimeType ); // dontAskAgainName, KEEP IN SYNC!!!
355 return choice == KMessageBox::Yes ? Save : ( choice == KMessageBox::No ? Open : Cancel );
356 // SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC SYNC
357}
358
359// Default implementation, overridden in TDEHTMLRun
360void BrowserRun::save( const KURL & url, const TQString & suggestedFilename )
361{
362 simpleSave( url, suggestedFilename, m_window );
363}
364
365// static
366void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilename )
367{
368 simpleSave (url, suggestedFilename, 0);
369}
370
371void BrowserRun::simpleSave( const KURL & url, const TQString & suggestedFilename,
372 TQWidget* window )
373{
374 // DownloadManager <-> konqueror integration
375 // find if the integration is enabled
376 // the empty key means no integration
377 // only use the downloadmanager for non-local urls
378 if ( !url.isLocalFile() )
379 {
380 TDEConfig cfg("konquerorrc", false, false);
381 cfg.setGroup("HTML Settings");
382 TQString downloadManger = cfg.readPathEntry("DownloadManager");
383 if (!downloadManger.isEmpty())
384 {
385 // then find the download manager location
386 kdDebug(1000) << "Using: "<<downloadManger <<" as Download Manager" <<endl;
387 TQString cmd=TDEStandardDirs::findExe(downloadManger);
388 if (cmd.isEmpty())
389 {
390 TQString errMsg=i18n("The Download Manager (%1) could not be found in your $PATH ").arg(downloadManger);
391 TQString errMsgEx= i18n("Try to reinstall it \n\nThe integration with Konqueror will be disabled!");
392 KMessageBox::detailedSorry(0,errMsg,errMsgEx);
393 cfg.writePathEntry("DownloadManager",TQString::null);
394 cfg.sync ();
395 }
396 else
397 {
398 // ### suggestedFilename not taken into account. Fix this (and
399 // the duplicated code) with shiny new KDownload class for 3.2 (pfeiffer)
400 // Until the shiny new class comes about, send the suggestedFilename
401 // along with the actual URL to download. (DA)
402 cmd += " " + TDEProcess::quote(url.url());
403 if ( !suggestedFilename.isEmpty() )
404 cmd +=" " + TDEProcess::quote(suggestedFilename);
405
406 kdDebug(1000) << "Calling command " << cmd << endl;
407 // slave is already on hold (slotBrowserMimetype())
408 TDEIO::Scheduler::publishSlaveOnHold();
409 KRun::runCommand(cmd);
410 return;
411 }
412 }
413 }
414
415 // no download manager available, let's do it ourself
416 KFileDialog *dlg = new KFileDialog( TQString::null, TQString::null /*all files*/,
417 window , "filedialog", true );
418 dlg->setOperationMode( KFileDialog::Saving );
419 dlg->setCaption(i18n("Save As"));
420
421 dlg->setSelection( suggestedFilename.isEmpty() ? url.fileName() : suggestedFilename );
422 if ( dlg->exec() )
423 {
424 KURL destURL( dlg->selectedURL() );
425 if ( destURL.isValid() )
426 {
427 TDEIO::Job *job = TDEIO::copy( url, destURL );
428 job->setWindow (window);
429 job->setAutoErrorHandlingEnabled( true );
430 }
431 }
432 delete dlg;
433}
434
435void BrowserRun::slotStatResult( TDEIO::Job *job )
436{
437 if ( job->error() ) {
438 kdDebug(1000) << "BrowserRun::slotStatResult : " << job->errorString() << endl;
439 handleError( job );
440 } else
441 KRun::slotStatResult( job );
442}
443
444void BrowserRun::handleError( TDEIO::Job * job )
445{
446 if ( !job ) { // Shouldn't happen, see docu.
447 kdWarning(1000) << "BrowserRun::handleError called with job=0! hideErrorDialog=" << d->m_bHideErrorDialog << endl;
448 return;
449 }
450
451 if (d->m_bHideErrorDialog && job->error() != TDEIO::ERR_NO_CONTENT)
452 {
453 redirectToError( job->error(), job->errorText() );
454 return;
455 }
456
457 // Reuse code in KRun, to benefit from d->m_showingError etc.
458 KRun::slotStatResult( job );
459}
460
461void BrowserRun::redirectToError( int error, const TQString& errorText )
462{
473 KURL newURL(TQString("error:/?error=%1&errText=%2")
474 .arg( error ).arg( KURL::encode_string(errorText) ), 106 );
475 m_strURL.setPass( TQString::null ); // don't put the password in the error URL
476
477 KURL::List lst;
478 lst << newURL << m_strURL;
479 m_strURL = KURL::join( lst );
480 //kdDebug(1202) << "BrowserRun::handleError m_strURL=" << m_strURL.prettyURL() << endl;
481
482 m_job = 0;
483 foundMimeType( "text/html" );
484}
485
486void BrowserRun::slotCopyToTempFileResult(TDEIO::Job *job)
487{
488 if ( job->error() ) {
489 job->showErrorDialog( m_window );
490 } else {
491 // Same as KRun::foundMimeType but with a different URL
492 (void) (KRun::runURL( static_cast<TDEIO::FileCopyJob *>(job)->destURL(), m_sMimeType ));
493 }
494 m_bFault = true; // see above
495 m_bFinished = true;
496 m_timer.start( 0, true );
497}
498
499bool BrowserRun::isTextExecutable( const TQString &serviceType )
500{
501 return ( serviceType == "application/x-desktop" ||
502 serviceType == "media/builtin-mydocuments" ||
503 serviceType == "media/builtin-mycomputer" ||
504 serviceType == "media/builtin-mynetworkplaces" ||
505 serviceType == "media/builtin-printers" ||
506 serviceType == "media/builtin-trash" ||
507 serviceType == "media/builtin-webbrowser" ||
508 serviceType == "application/x-shellscript" );
509}
510
511bool BrowserRun::isExecutable( const TQString &serviceType )
512{
513 return KRun::isExecutable( serviceType );
514}
515
516bool BrowserRun::hideErrorDialog() const
517{
518 return d->m_bHideErrorDialog;
519}
520
521TQString BrowserRun::contentDisposition() const {
522 return d->contentDisposition;
523}
524
525#include "browserrun.moc"
KGuiItem
KMessageBox::detailedSorry
static void detailedSorry(TQWidget *parent, const TQString &text, const TQString &details, const TQString &caption=TQString::null, int options=Notify)
KMessageBox::warningContinueCancel
static int warningContinueCancel(TQWidget *parent, const TQString &text, const TQString &caption=TQString::null, const KGuiItem &buttonContinue=KStdGuiItem::cont(), const TQString &dontAskAgainName=TQString::null, int options=Notify)
KMessageBox::questionYesNoCancel
static int questionYesNoCancel(TQWidget *parent, const TQString &text, const TQString &caption=TQString::null, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const TQString &dontAskAgainName=TQString::null, int options=Notify)
KParts::BrowserRun::handleError
virtual void handleError(TDEIO::Job *job)
Called when an error happens.
Definition: browserrun.cpp:444
KParts::BrowserRun::hideErrorDialog
bool hideErrorDialog() const
Definition: browserrun.cpp:516
KParts::BrowserRun::scanFile
virtual void scanFile()
Reimplemented from KRun.
Definition: browserrun.cpp:98
KParts::BrowserRun::askEmbedOrSave
static AskSaveResult askEmbedOrSave(const KURL &url, const TQString &mimeType, const TQString &suggestedFilename=TQString::null, int flags=0)
Similar to askSave() but for the case where the current application is able to embed the url itself (...
Definition: browserrun.cpp:323
KParts::BrowserRun::init
virtual void init()
Reimplemented from KRun.
Definition: browserrun.cpp:70
KParts::BrowserRun::BrowserRun
BrowserRun(const KURL &url, const KParts::URLArgs &args, KParts::ReadOnlyPart *part, TQWidget *window, bool removeReferrer, bool trustedSource)
Definition: browserrun.cpp:42
KParts::BrowserRun::askSave
static AskSaveResult askSave(const KURL &url, KService::Ptr offer, const TQString &mimeType, const TQString &suggestedFilename=TQString::null)
Ask the user whether to save or open a url in another application.
Definition: browserrun.cpp:300
KParts::BrowserRun::url
KURL url() const
Definition: browserrun.h:83
KParts::BrowserRun::suggestedFilename
TQString suggestedFilename() const
Definition: browserrun.h:93
KParts::BrowserRun::handleNonEmbeddable
NonEmbeddableResult handleNonEmbeddable(const TQString &mimeType)
Helper for foundMimeType: call this if the mimetype couldn't be embedded.
Definition: browserrun.cpp:203
KParts::BrowserRun::isExecutable
static bool isExecutable(const TQString &serviceType)
BIC: Obsoleted by KRun::isExecutable( const TQString &serviceType );.
Definition: browserrun.cpp:511
KParts::BrowserRun::NonEmbeddableResult
NonEmbeddableResult
NotHandled means that foundMimeType should call KRun::foundMimeType, i.e.
Definition: browserrun.h:164
KParts::BrowserRun::contentDisposition
TQString contentDisposition() const
Definition: browserrun.cpp:521
KParts::ReadOnlyPart
Base class for any "viewer" part.
Definition: part.h:339
KParts::ReadOnlyPart::url
KURL url() const
Returns the currently in part used URL.
Definition: part.h:390
KStringHandler::csqueeze
static TQString csqueeze(const TQString &str, uint maxlen=40)
KTempFile
KTempFile::name
TQString name() const
KURL::List
KURL
KURL::encode_string
static TQString encode_string(const TQString &str, int encoding_hint=0)
KURL::setPath
void setPath(const TQString &path)
KURL::protocol
TQString protocol() const
KURL::join
static KURL join(const List &_list)
KURL::fileName
TQString fileName(bool _ignore_trailing_slash_in_path=true) const
KURL::url
TQString url(int _trailing=0, int encoding_hint=0) const
KURL::host
TQString host() const
KURL::isLocalFile
bool isLocalFile() const
KURL::prettyURL
TQString prettyURL(int _trailing=0) const
TDEConfig
TDEProcess::quote
static TQString quote(const TQString &arg)
TDEStandardDirs::findExe
static TQString findExe(const TQString &appname, const TQString &pathstr=TQString::null, bool ignoreExecBit=false)
kdWarning
kdbgstream kdWarning(int area=0)
endl
kndbgstream & endl(kndbgstream &s)
kdDebug
kdbgstream kdDebug(int area=0)
KParts::URLArgs
URLArgs is a set of arguments bundled into a structure, to allow specifying how a URL should be opene...
Definition: browserextension.h:58
KParts::URLArgs::contentType
TQString contentType() const
TDEHTML-specific field, header defining the type of the POST data.
Definition: browserextension.cpp:158
KParts::URLArgs::metaData
TQMap< TQString, TQString > & metaData()
Meta-data to associate with the next TDEIO operation.
Definition: browserextension.cpp:163
KParts::URLArgs::reload
bool reload
reload is set when the cache shouldn't be used (forced reload).
Definition: browserextension.h:75
KParts::URLArgs::doPost
bool doPost() const
TDEHTML-specific field, whether to do a POST instead of a GET, for the next openURL.
Definition: browserextension.cpp:177
KParts::URLArgs::postData
TQByteArray postData
TDEHTML-specific field, contents of the HTTP POST data.
Definition: browserextension.h:94
tdelocale.h

tdeparts

Skip menu "tdeparts"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeparts

Skip menu "tdeparts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeparts by doxygen 1.9.4
This website is maintained by Timothy Pearson.