summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-02-07 20:05:18 (UTC)
committer zautrix <zautrix>2005-02-07 20:05:18 (UTC)
commitda5e47069d88fa9aa656423ce4c60bf505728e1c (patch) (unidiff)
treefdbaf29835a028f1204a19fc10dea97d469c0b29 /microkde
parent456b0246521847635fe98471691ceecae211e0c3 (diff)
downloadkdepimpi-da5e47069d88fa9aa656423ce4c60bf505728e1c.zip
kdepimpi-da5e47069d88fa9aa656423ce4c60bf505728e1c.tar.gz
kdepimpi-da5e47069d88fa9aa656423ce4c60bf505728e1c.tar.bz2
fixes
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kapplication.cpp3
-rw-r--r--microkde/kdecore/klibloader.cpp14
-rw-r--r--microkde/kdeui/ktoolbar.cpp2
-rw-r--r--microkde/kdeui/ktoolbar.h2
4 files changed, 7 insertions, 14 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index 21aa0a4..f05b91b 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -76,25 +76,26 @@ bool KApplication::convert2latin1(QString fileName)
76 76
77 } 77 }
78 QTextStream ts( &file ); 78 QTextStream ts( &file );
79 ts.setEncoding( QTextStream::UnicodeUTF8 ); 79 ts.setEncoding( QTextStream::UnicodeUTF8 );
80 text = ts.read(); 80 text = ts.read();
81 file.close(); 81 file.close();
82 if (!file.open( IO_WriteOnly ) ) { 82 if (!file.open( IO_WriteOnly ) ) {
83 return false; 83 return false;
84 } 84 }
85 QTextStream tsIn( &file ); 85 QTextStream tsIn( &file );
86 tsIn.setEncoding( QTextStream::Latin1 ); 86 tsIn.setEncoding( QTextStream::Latin1 );
87 tsIn << text.latin1(); 87 tsIn << text.latin1();
88 file.close(); 88 file.close();
89 return true;
89 90
90 91
91} 92}
92void KApplication::showText(QString caption, QString text) 93void KApplication::showText(QString caption, QString text)
93{ 94{
94 QDialog dia( 0, "name", true ); ; 95 QDialog dia( 0, "name", true ); ;
95 dia.setCaption( caption ); 96 dia.setCaption( caption );
96 QVBoxLayout* lay = new QVBoxLayout( &dia ); 97 QVBoxLayout* lay = new QVBoxLayout( &dia );
97 lay->setSpacing( 3 ); 98 lay->setSpacing( 3 );
98 lay->setMargin( 3 ); 99 lay->setMargin( 3 );
99 KTextEdit tb ( &dia ); 100 KTextEdit tb ( &dia );
100 tb.setWordWrap( QMultiLineEdit::WidgetWidth ); 101 tb.setWordWrap( QMultiLineEdit::WidgetWidth );
diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp
index 1394154..6d0475a 100644
--- a/microkde/kdecore/klibloader.cpp
+++ b/microkde/kdecore/klibloader.cpp
@@ -487,35 +487,27 @@ KLibrary* KLibLoader::library( const char *name )
487 if ( libfile.isEmpty() ) 487 if ( libfile.isEmpty() )
488 return 0; 488 return 0;
489#ifdef DESKTOP_VERSION 489#ifdef DESKTOP_VERSION
490 QLibrary *qlib = new QLibrary( libfile.latin1() ); 490 QLibrary *qlib = new QLibrary( libfile.latin1() );
491#else 491#else
492 QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately ); 492 QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately );
493#endif 493#endif
494 494
495//US lt_dlhandle handle = lt_dlopen( libfile.latin1() ); 495//US lt_dlhandle handle = lt_dlopen( libfile.latin1() );
496//US if ( !handle ) 496//US if ( !handle )
497 if ( !qlib ) 497 if ( !qlib )
498 { 498 {
499//US const char* errmsg = lt_dlerror(); 499 qDebug( "KLibLoader::library could not load library: %s", libfile.latin1());
500 char* errmsg; 500 d->errorMessage = QString::null;
501 sprintf(errmsg, "KLibLoader::library could not load library: %s", libfile.latin1()); 501 return 0;
502 qDebug(errmsg);
503
504 if(errmsg)
505 d->errorMessage = QString::fromLatin1(errmsg);
506 else
507 d->errorMessage = QString::null;
508 kdWarning(150) << "library=" << name << ": file=" << libfile << ": " << d->errorMessage << endl;
509 return 0;
510 } 502 }
511 else 503 else
512 d->errorMessage = QString::null; 504 d->errorMessage = QString::null;
513 505
514 KLibrary *lib = new KLibrary( name, libfile, qlib ); 506 KLibrary *lib = new KLibrary( name, libfile, qlib );
515 wrap = new KLibWrapPrivate(lib, qlib); 507 wrap = new KLibWrapPrivate(lib, qlib);
516 d->loaded_stack.prepend(wrap); 508 d->loaded_stack.prepend(wrap);
517 } 509 }
518 m_libs.insert( name, wrap ); 510 m_libs.insert( name, wrap );
519 511
520 connect( wrap->lib, SIGNAL( destroyed() ), 512 connect( wrap->lib, SIGNAL( destroyed() ),
521 this, SLOT( slotLibraryDestroyed() ) ); 513 this, SLOT( slotLibraryDestroyed() ) );
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index 1ad1728..09ad0c8 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -869,25 +869,25 @@ void KToolBar::enableMoving(bool flag )
869} 869}
870 870
871 871
872void KToolBar::setBarPos (BarPosition bpos) 872void KToolBar::setBarPos (BarPosition bpos)
873{ 873{
874 if ( !mainWindow() ) 874 if ( !mainWindow() )
875 return; 875 return;
876//US mainWindow()->moveDockWindow( this, (Dock)bpos ); 876//US mainWindow()->moveDockWindow( this, (Dock)bpos );
877 mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos ); 877 mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos );
878} 878}
879 879
880 880
881KToolBar::BarPosition KToolBar::barPos() 881KToolBar::BarPosition KToolBar::barPos() const
882{ 882{
883 if ( !(QMainWindow*)mainWindow() ) 883 if ( !(QMainWindow*)mainWindow() )
884 return KToolBar::Top; 884 return KToolBar::Top;
885//US Dock dock; 885//US Dock dock;
886 QMainWindow::ToolBarDock dock; 886 QMainWindow::ToolBarDock dock;
887 int dm1, dm2; 887 int dm1, dm2;
888 bool dm3; 888 bool dm3;
889 ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 ); 889 ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 );
890//US if ( dock == DockUnmanaged ) { 890//US if ( dock == DockUnmanaged ) {
891 if ( dock == QMainWindow::Unmanaged ) { 891 if ( dock == QMainWindow::Unmanaged ) {
892 return (KToolBar::BarPosition)Top; 892 return (KToolBar::BarPosition)Top;
893 } 893 }
diff --git a/microkde/kdeui/ktoolbar.h b/microkde/kdeui/ktoolbar.h
index 61b5ea3..49ff856 100644
--- a/microkde/kdeui/ktoolbar.h
+++ b/microkde/kdeui/ktoolbar.h
@@ -737,25 +737,25 @@ public:
737 */ 737 */
738 void enableMoving(bool flag = true); 738 void enableMoving(bool flag = true);
739 739
740 /** 740 /**
741 * Set position of toolbar. 741 * Set position of toolbar.
742 * @see BarPosition() 742 * @see BarPosition()
743 */ 743 */
744 void setBarPos (BarPosition bpos); 744 void setBarPos (BarPosition bpos);
745 745
746 /** 746 /**
747 * Returns position of toolbar. 747 * Returns position of toolbar.
748 */ 748 */
749 BarPosition barPos(); 749 BarPosition barPos() const;
750 750
751 /** 751 /**
752 * @deprecated 752 * @deprecated
753 * Show, hide, or toggle toolbar. 753 * Show, hide, or toggle toolbar.
754 * 754 *
755 * This method is provided for compatibility only, 755 * This method is provided for compatibility only,
756 * please use show() and/or hide() instead. 756 * please use show() and/or hide() instead.
757 * @see BarStatus 757 * @see BarStatus
758 */ 758 */
759 bool enable(BarStatus stat); 759 bool enable(BarStatus stat);
760 760
761 /** 761 /**