author | ar <ar> | 2004-05-31 15:26:50 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-31 15:26:50 (UTC) |
commit | 27dfc34d411dee76f09f5e516c60b0a64eb35948 (patch) (unidiff) | |
tree | b7f7259497630390e352a1257cac5dc59f5399a6 /noncore/apps/tinykate | |
parent | 27b09fe4f930b96e82cea9fb0eb1a9b87f7ec062 (diff) | |
download | opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.zip opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.gz opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.bz2 |
- convert qWarning to owarn
-rw-r--r-- | noncore/apps/tinykate/libkate/kateconfig.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/tinykate/libkate/kateconfig.cpp b/noncore/apps/tinykate/libkate/kateconfig.cpp index 782b629..4b8ce78 100644 --- a/noncore/apps/tinykate/libkate/kateconfig.cpp +++ b/noncore/apps/tinykate/libkate/kateconfig.cpp | |||
@@ -3,48 +3,49 @@ | |||
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #define QTOPIA_INTERNAL_LANGLIST | 21 | #define QTOPIA_INTERNAL_LANGLIST |
22 | #include "kateconfig.h" | 22 | #include "kateconfig.h" |
23 | 23 | ||
24 | /* OPIE */ | 24 | /* OPIE */ |
25 | #include <opie2/odebug.h> | 25 | #include <opie2/odebug.h> |
26 | #include <qpe/global.h> | 26 | #include <qpe/global.h> |
27 | using namespace Opie::Core; | ||
27 | 28 | ||
28 | /* QT */ | 29 | /* QT */ |
29 | #include <qdir.h> | 30 | #include <qdir.h> |
30 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
31 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) | 32 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) |
32 | #include <qtextcodec.h> | 33 | #include <qtextcodec.h> |
33 | #endif | 34 | #endif |
34 | #include <qtextstream.h> | 35 | #include <qtextstream.h> |
35 | 36 | ||
36 | /* STD */ | 37 | /* STD */ |
37 | #include <sys/stat.h> | 38 | #include <sys/stat.h> |
38 | #include <sys/types.h> | 39 | #include <sys/types.h> |
39 | #include <fcntl.h> | 40 | #include <fcntl.h> |
40 | #include <stdlib.h> | 41 | #include <stdlib.h> |
41 | #include <unistd.h> | 42 | #include <unistd.h> |
42 | 43 | ||
43 | 44 | ||
44 | /*! | 45 | /*! |
45 | \internal | 46 | \internal |
46 | */ | 47 | */ |
47 | QString KateConfig::configFilename(const QString& name, Domain d) | 48 | QString KateConfig::configFilename(const QString& name, Domain d) |
48 | { | 49 | { |
49 | switch (d) { | 50 | switch (d) { |
50 | case File: | 51 | case File: |
@@ -535,50 +536,49 @@ void KateConfig::write( const QString &fn ) | |||
535 | QCString cstr; | 536 | QCString cstr; |
536 | QMap< QString, KateConfigGroup >::Iterator g_it = groups.begin(); | 537 | QMap< QString, KateConfigGroup >::Iterator g_it = groups.begin(); |
537 | 538 | ||
538 | for ( ; g_it != groups.end(); ++g_it ) { | 539 | for ( ; g_it != groups.end(); ++g_it ) { |
539 | str += "[" + g_it.key() + "]\n"; | 540 | str += "[" + g_it.key() + "]\n"; |
540 | KateConfigGroup::Iterator e_it = ( *g_it ).begin(); | 541 | KateConfigGroup::Iterator e_it = ( *g_it ).begin(); |
541 | for ( ; e_it != ( *g_it ).end(); ++e_it ) | 542 | for ( ; e_it != ( *g_it ).end(); ++e_it ) |
542 | str += e_it.key() + " = " + *e_it + "\n"; | 543 | str += e_it.key() + " = " + *e_it + "\n"; |
543 | } | 544 | } |
544 | cstr = str.utf8(); | 545 | cstr = str.utf8(); |
545 | 546 | ||
546 | int total_length; | 547 | int total_length; |
547 | total_length = f.writeBlock( cstr.data(), cstr.length() ); | 548 | total_length = f.writeBlock( cstr.data(), cstr.length() ); |
548 | if ( total_length != int(cstr.length()) ) { | 549 | if ( total_length != int(cstr.length()) ) { |
549 | QMessageBox::critical( 0, QObject::tr("Out of Space"), | 550 | QMessageBox::critical( 0, QObject::tr("Out of Space"), |
550 | QObject::tr("There was a problem creating\nKateConfiguration Information \nfor this program.\n\nPlease free up some space and\ntry again.") ); | 551 | QObject::tr("There was a problem creating\nKateConfiguration Information \nfor this program.\n\nPlease free up some space and\ntry again.") ); |
551 | f.close(); | 552 | f.close(); |
552 | QFile::remove( strNewFile ); | 553 | QFile::remove( strNewFile ); |
553 | return; | 554 | return; |
554 | } | 555 | } |
555 | 556 | ||
556 | f.close(); | 557 | f.close(); |
557 | // now rename the file... | 558 | // now rename the file... |
558 | if ( rename( strNewFile, filename ) < 0 ) { | 559 | if ( rename( strNewFile, filename ) < 0 ) { |
559 | qWarning( "problem renaming the file %s to %s", strNewFile.latin1(), | 560 | owarn << "problem renaming the file " << strNewFile.latin1() << " to " << filename.latin1() << oendl; |
560 | filename.latin1() ); | ||
561 | QFile::remove( strNewFile ); | 561 | QFile::remove( strNewFile ); |
562 | } | 562 | } |
563 | } | 563 | } |
564 | 564 | ||
565 | /*! | 565 | /*! |
566 | Returns whether the KateConfig is in a valid state. | 566 | Returns whether the KateConfig is in a valid state. |
567 | */ | 567 | */ |
568 | bool KateConfig::isValid() const | 568 | bool KateConfig::isValid() const |
569 | { | 569 | { |
570 | return groups.end() != git; | 570 | return groups.end() != git; |
571 | } | 571 | } |
572 | 572 | ||
573 | /*! | 573 | /*! |
574 | \internal | 574 | \internal |
575 | */ | 575 | */ |
576 | void KateConfig::read() | 576 | void KateConfig::read() |
577 | { | 577 | { |
578 | changed = FALSE; | 578 | changed = FALSE; |
579 | 579 | ||
580 | if ( !QFileInfo( filename ).exists() ) { | 580 | if ( !QFileInfo( filename ).exists() ) { |
581 | git = groups.end(); | 581 | git = groups.end(); |
582 | return; | 582 | return; |
583 | } | 583 | } |
584 | 584 | ||