[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdegraphics/kpdf/kpdf
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2004-11-26 18:04:03
Message-ID: 20041126180403.72C2A1857C () office ! kde ! org
[Download RAW message or body]

CVS commit by aacid: 

Don't cache not translate xpdf error messages, only show them using kdDebug
BUG: 92944 


  M +1 -1      Makefile.am   1.36
  M +4 -34     kpdf_error.cpp   1.7
  M +0 -2      kpdf_part.cpp   1.92
  R            kpdf_error.h   1.2
  R            xpdf_errors.cpp   1.7
  R            xpdf_errors.h   1.2


--- kdegraphics/kpdf/kpdf/Makefile.am  #1.35:1.36
@@ -42,5 +42,5 @@
 
 # the Part's source, library search path, and link libraries
-libkpdfpart_la_SOURCES = QOutputDev.cpp QOutputDevPixmap.cpp kpdf_part.cpp \
kpdf_pagewidget.cc part.cpp thumbnail.cpp thumbnaillist.cpp kpdf_error.cpp \
xpdf_errors.cpp thumbnailgenerator.cpp toc.cpp +libkpdfpart_la_SOURCES = \
QOutputDev.cpp QOutputDevPixmap.cpp kpdf_part.cpp kpdf_pagewidget.cc part.cpp \
thumbnail.cpp thumbnaillist.cpp kpdf_error.cpp thumbnailgenerator.cpp toc.cpp  \
libkpdfpart_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)  \
libkpdfpart_la_LIBADD  = ../xpdf/libxpdf.la $(LIB_KPARTS) $(LIB_KFILE) \
$(LIB_KDEPRINT) $(LIB_KUTILS) -lm

--- kdegraphics/kpdf/kpdf/kpdf_error.cpp  #1.6:1.7
@@ -19,30 +19,7 @@
 #include "Error.h"
 
-#include "kpdf_error.h"
-
 #include <qstring.h>
 
 #include <kdebug.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-
-#include "xpdf_errors.h"
-
-QStringList errors::p_errors;
-
-void errors::add(const QString &s)
-{
-        p_errors.append(s);
-}
-
-bool errors::exists(const QString &s)
-{
-        return p_errors.findIndex(s) != -1;
-}
-
-void errors::clear()
-{
-        p_errors.clear();
-}
 
 void CDECL error(int pos, const char *msg, ...) {
@@ -56,19 +33,12 @@ void CDECL error(int pos, const char *ms
   }
   if (pos >= 0) {
-    emsg = i18n("Error (%1): ").arg(pos);
+    emsg = QString("Error (%1): ").arg(pos);
   } else {
-    emsg = i18n("Error: ");
+    emsg = "Error: ";
   }
   va_start(args, msg);
-  tmsg = XPDFErrorTranslator::translateError(msg);
-  vsprintf(buffer, tmsg.latin1(), args);
+  vsprintf(buffer, msg, args);
   va_end(args);
   emsg += buffer;
-  if (!errors::exists(emsg))
-  {
-  // TODO think a way to avoid threads can popup that
-  //  KMessageBox::error(0, emsg);
     kdDebug() << emsg << endl;
-    errors::add(emsg);
-  }
 }

--- kdegraphics/kpdf/kpdf/kpdf_part.cpp  #1.91:1.92
@@ -49,5 +49,4 @@
 #include <ktempfile.h>
 
-#include "kpdf_error.h"
 #include "part.h"
 
@@ -450,5 +449,4 @@ Part::openFile()
   m_findNext->setEnabled(true);
 
-  errors::clear();
   m_currentPage = 0; //so that the if in goToPage is true
   if (m_doc->getNumPages() > 0)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic