Fixed krazy issues

svn path=/trunk/playground/graphics/okular/; revision=619843
This commit is contained in:
Tobias Koenig 2007-01-04 15:22:28 +00:00
parent 4aa85cdb49
commit ac792e5c9c
32 changed files with 101 additions and 97 deletions

View file

@ -759,7 +759,7 @@ class OKULAR_EXPORT LineAnnotation : public Annotation
/**
* Creates a new line annotation from the xml @p description
*/
LineAnnotation( const QDomNode &description );
explicit LineAnnotation( const QDomNode &description );
/**
* Destroys the line annotation.
@ -990,7 +990,7 @@ class OKULAR_EXPORT HighlightAnnotation : public Annotation
/**
* Creates a new highlight annotation from the xml @p description
*/
HighlightAnnotation( const QDomNode &description );
explicit HighlightAnnotation( const QDomNode &description );
/**
* Destroys the highlight annotation.
@ -1130,7 +1130,7 @@ class OKULAR_EXPORT StampAnnotation : public Annotation
/**
* Creates a new stamp annotation from the xml @p description
*/
StampAnnotation( const QDomNode &description );
explicit StampAnnotation( const QDomNode &description );
/**
* Destroys the stamp annotation.

View file

@ -29,7 +29,7 @@ class OKULAR_EXPORT BookmarkManager : public QObject, public KBookmarkOwner
Q_OBJECT
public:
BookmarkManager( Document * document );
explicit BookmarkManager( Document * document );
virtual ~BookmarkManager();
virtual QString currentUrl() const;

View file

@ -496,7 +496,7 @@ class OKULAR_EXPORT Document : public QObject
void openUrl( const KUrl &url );
/**
* This signal is emitted whenever an error occured.
* This signal is emitted whenever an error occurred.
*
* @param text The description of the error.
* @param duration The time in seconds the message should be shown to the user.
@ -536,7 +536,7 @@ class OKULAR_EXPORT Document : public QObject
* @short A view on the document.
*
* The Viewport structure is the 'current view' over the document. Contained
* data is broadcasted between observers to syncronize their viewports to get
* data is broadcasted between observers to synchronize their viewports to get
* the 'I scroll one view and others scroll too' views.
*/
class OKULAR_EXPORT DocumentViewport

View file

@ -43,8 +43,8 @@ class Page;
class PixmapRequest;
class TextPage;
/* Note: on contents generation and asyncronous queries.
* Many observers may want to request data syncronously or asyncronously.
/* Note: on contents generation and asynchronous queries.
* Many observers may want to request data syncronously or asynchronously.
* - Sync requests. These should be done in-place.
* - Async request must be done in real background. That usually means a
* thread, such as QThread derived classes.

View file

@ -244,7 +244,7 @@ class OKULAR_EXPORT LinkAction : public Link
*
* @param actionType The type of action.
*/
LinkAction( enum ActionType actionType );
explicit LinkAction( enum ActionType actionType );
/**
* Destroys the action link.

View file

@ -48,12 +48,12 @@ class OKULAR_EXPORT Sound
* Creates a new sound object with the given embedded
* sound @p data.
*/
Sound( const QByteArray& data );
explicit Sound( const QByteArray& data );
/**
* Creates a new sound object with the given external @p filename.
*/
Sound( const QString& filename );
explicit Sound( const QString& filename );
/**
* Destroys the sound object.

View file

@ -253,7 +253,7 @@ void ProtocolMSITS::listDir (const KUrl & url)
if ( !parseLoadAndLookup ( url, filepath ) )
return; // error() has been called by parseLoadAndLookup
filepath += "/";
filepath += '/';
if ( !isDirectory (filepath) )
{

View file

@ -30,12 +30,12 @@
#include "iconstorage.h"
KCHMMainTreeViewItem::KCHMMainTreeViewItem( K3ListViewItem * parent, K3ListViewItem * after, QString name, QString aurl, int image) :
KCHMMainTreeViewItem::KCHMMainTreeViewItem( K3ListViewItem * parent, K3ListViewItem * after, const QString &name, const QString &aurl, int image) :
K3ListViewItem (parent, after, name), url(aurl), image_number(image)
{
}
KCHMMainTreeViewItem::KCHMMainTreeViewItem( K3ListView * parent, K3ListViewItem * after, QString name, QString aurl, int image) :
KCHMMainTreeViewItem::KCHMMainTreeViewItem( K3ListView * parent, K3ListViewItem * after, const QString &name, QString const &aurl, int image) :
K3ListViewItem (parent, after, name), url(aurl), image_number(image)
{
}
@ -89,7 +89,7 @@ QString KCHMMainTreeViewItem::getUrl( ) const
if ( dlg.exec() == QDialog::Accepted )
return dlg.getSelectedItemUrl();
*/
return QString::null;
return QString();
}
void KCHMMainTreeViewItem::paintBranches( QPainter * p, const QColorGroup & cg, int w, int y, int h )

View file

@ -39,8 +39,8 @@ namespace KCHMImageType
class KCHMMainTreeViewItem : public K3ListViewItem
{
public:
KCHMMainTreeViewItem(K3ListViewItem* parent, K3ListViewItem* after, QString name, QString aurl, int image);
KCHMMainTreeViewItem(K3ListView* parent, K3ListViewItem* after, QString name, QString url, int image);
KCHMMainTreeViewItem(K3ListViewItem* parent, K3ListViewItem* after, const QString &name, const QString &aurl, int image);
KCHMMainTreeViewItem(K3ListView* parent, K3ListViewItem* after, const QString &name, const QString &url, int image);
QString getUrl() const;
virtual void setOpen ( bool open );

View file

@ -57,7 +57,7 @@ namespace KCHMUrl
// Normalize url, so it becomes absolute
if ( newurl[0] != '/' )
newurl = "/" + newurl;
newurl = '/' + newurl;
newurl = QDir::cleanPath (newurl);
}
@ -79,7 +79,7 @@ namespace KCHMUrl
// Normalize url, so it becomes absolute
if ( newurl[0] != '/' )
newurl = "/" + newurl;
newurl = '/' + newurl;
}
//qDebug ("KCHMViewWindow::makeURLabsolute (%s) -> (%s)", url.ascii(), newurl.ascii());

View file

@ -187,7 +187,7 @@ inline int CHMFile::findStringInQuotes (const QString& tag, int offset, QString&
// If we do not need to decode HTML entities, just return.
if ( decodeentities )
{
QString htmlentity = QString::null;
QString htmlentity;
bool fill_entity = false;
value.reserve (qend - qbegin); // to avoid multiple memory allocations
@ -214,7 +214,7 @@ inline int CHMFile::findStringInQuotes (const QString& tag, int offset, QString&
}
value.append (it.value());
htmlentity = QString::null;
htmlentity.clear();
fill_entity = false;
}
else
@ -326,7 +326,11 @@ void CHMFile::CloseCHM()
m_chmFile = NULL;
m_home = "/";
m_filename = m_home = m_topicsFile = m_indexFile = m_font = QString::null;
m_filename.clear();
m_home.clear();
m_topicsFile.clear();
m_indexFile.clear();
m_font.clear();
m_PageUrl.clear();
m_UrlPage.clear();
@ -465,7 +469,7 @@ bool CHMFile::ParseHhcAndFillTree (const QString& file, QDomDocument *tree, bool
qDebug ("CHMFile::ParseAndFillTopicsTree: <object> tag is parsed, but both name and url are empty.");
}
name = QString::null;
name.clear();
urls.clear();
in_object = false;
imagenum = defaultimagenum;
@ -497,7 +501,7 @@ bool CHMFile::ParseHhcAndFillTree (const QString& file, QDomDocument *tree, bool
else if ( pname == "local" )
urls.push_back (KCHMUrl::makeURLabsoluteIfNeeded(pvalue));
else if ( pname == "see also" && asIndex && name != pvalue )
urls.push_back (KCHMUrl::makeURLabsoluteIfNeeded(":" + pvalue));
urls.push_back (KCHMUrl::makeURLabsoluteIfNeeded(':' + pvalue));
else if ( pname == "imagenumber" )
{
bool bok;
@ -642,7 +646,7 @@ bool CHMFile::ParseHhcAndFillTree (const QString& file, K3ListView *tree, bool a
qDebug ("CHMFile::ParseAndFillTopicsTree: <object> tag is parsed, but both name and url are empty.");
}
name = QString::null;
name.clear();
urls.clear();
in_object = false;
imagenum = defaultimagenum;
@ -674,7 +678,7 @@ bool CHMFile::ParseHhcAndFillTree (const QString& file, K3ListView *tree, bool a
else if ( pname == "local" )
urls.push_back (KCHMUrl::makeURLabsoluteIfNeeded (pvalue));
else if ( pname == "see also" && asIndex && name != pvalue )
urls.push_back (":" + pvalue);
urls.push_back (':' + pvalue);
else if ( pname == "imagenumber" )
{
bool bok;
@ -1271,7 +1275,7 @@ bool CHMFile::GetFileContentAsString(QString& str, chmUnitInfo *ui)
}
else
{
str = QString::null;
str.clear();
return false;
}
}
@ -1279,7 +1283,7 @@ bool CHMFile::GetFileContentAsString(QString& str, chmUnitInfo *ui)
bool CHMFile::GetFileContentAsString( QString & str, QString filename, QString location )
{
str = QString::null;
str.clear();
if ( m_filename == filename )
return GetFileContentAsString (str, location);
@ -1379,7 +1383,7 @@ QByteArray CHMFile::convertSearchWord( const QString & src )
QString CHMFile::getTopicByUrl( const QString & search_url )
{
if ( !m_lookupTablesValid )
return QString::null;
return QString();
unsigned char buf[COMMON_BUF_LEN];
int pos = search_url.indexOf ('#');
@ -1388,7 +1392,7 @@ QString CHMFile::getTopicByUrl( const QString & search_url )
for ( unsigned int i = 0; i < m_chmTOPICS.length; i += TOPICS_ENTRY_LEN )
{
if ( RetrieveObject ( &m_chmTOPICS, buf, i, TOPICS_ENTRY_LEN) == 0 )
return QString::null;
return QString();
u_int32_t off_title = *(u_int32_t *)(buf + 4);
FIXENDIAN32(off_title);
@ -1399,7 +1403,7 @@ QString CHMFile::getTopicByUrl( const QString & search_url )
QString topic, url;
if ( RetrieveObject ( &m_chmURLTBL, buf, off_url, URLTBL_ENTRY_LEN) == 0 )
return QString::null;
return QString();
off_url = *(u_int32_t *)(buf + 8);
FIXENDIAN32(off_url);
@ -1424,7 +1428,7 @@ QString CHMFile::getTopicByUrl( const QString & search_url )
return topic;
}
return QString::null;
return QString();
}
void CHMFile::GetSearchResults( const KCHMSearchProgressResults_t & tempres, KCHMSearchResults_t & results, unsigned int limit_results )
@ -1560,7 +1564,7 @@ bool CHMFile::ParseChmIndexFile ( const QString& file, bool asIndex, KCHMParsedI
qDebug ("CHMFile::ParseAndFillTopicsTree: <object> tag is parsed, but both name and url are empty.");
}
name = QString::null;
name.clear();
urls.clear();
in_object = false;
imagenum = defaultimagenum;

View file

@ -100,7 +100,7 @@ public:
*/
CHMFile(const QString& archiveName);
//! Destructor. If a file has been succesfully opened, it closes it.
//! Destructor. If a file has been successfully opened, it closes it.
~CHMFile();
/*!
@ -153,9 +153,9 @@ public:
/*!
\brief Checks if the last attempt to load a .chm file was
succesful.
successful.
\return true, if the last attempt to load a .chm file was
succesful, false otherwise.
successful, false otherwise.
*/
bool IsOk() const { return m_chmFile != NULL; }
@ -218,7 +218,7 @@ public:
filesystem.
\param ui A pointer to CHMLIB specific data about the file.
The parameter gets filled with useful data if the lookup
was succesful.
was successful.
\return true if the file exists in the archive, false otherwise.
*/
bool ResolveObject(const QString& fileName, chmUnitInfo *ui);
@ -226,7 +226,7 @@ public:
/*!
\brief Retrieves an uncompressed chunk of a file in the .chm.
\param ui Pointer to a CHMLIB specific data structure obtained
from a succesful call to ResolveObject().
from a successful call to ResolveObject().
\param buffer The buffer to place the chunk into.
\param fileOffset Where does the chunk we want begin in the file?
\param bufferSize The size of the buffer.

View file

@ -18,7 +18,7 @@ class TeXFont {
TeXFont(TeXFontDefinition *_parent)
{
parent = _parent;
errorMessage = QString::null;
errorMessage.clear();
};
virtual ~TeXFont();

View file

@ -30,7 +30,7 @@ extern const int MFResolutions[];
// #define DEBUG_FONT
TeXFontDefinition::TeXFontDefinition(QString nfontname, double _displayResolution_in_dpi, quint32 chk, qint32 _scaled_size_in_DVI_units,
TeXFontDefinition::TeXFontDefinition(const QString &nfontname, double _displayResolution_in_dpi, quint32 chk, qint32 _scaled_size_in_DVI_units,
class fontPool *pool, double _enlargement)
{
#ifdef DEBUG_FONT
@ -45,7 +45,7 @@ TeXFontDefinition::TeXFontDefinition(QString nfontname, double _displayResolutio
checksum = chk;
flags = TeXFontDefinition::FONT_IN_USE;
file = 0;
filename = QString::null;
filename.clear();
scaled_size_in_DVI_units = _scaled_size_in_DVI_units;
macrotable = 0;
@ -92,8 +92,8 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
flags |= TeXFontDefinition::FONT_LOADED;
filename = fname;
#ifdef HAVE_FREETYPE
fullFontName = QString::null;
fullEncodingName = QString::null;
fullFontName.clear();
fullEncodingName.clear();
#endif
file = fopen(QFile::encodeName(filename), "r");
@ -101,7 +101,7 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
// in the DVI file's directory. If that works, modify the filename
// accordingly and go on.
if (file == 0) {
QString filename_test(font_pool->getExtraSearchPath() + "/" + filename);
QString filename_test(font_pool->getExtraSearchPath() + '/' + filename);
file = fopen( QFile::encodeName(filename_test), "r");
if (file == 0) {
kError(kvs::dvi) << i18n("Cannot find font %1, file %2.", fontname, filename) << endl;
@ -194,7 +194,7 @@ void TeXFontDefinition::reset()
vf_table.clear();
}
filename = QString::null;
filename.clear();
flags = TeXFontDefinition::FONT_IN_USE;
set_char_p = &dviRenderer::set_empty_char;
}

View file

@ -64,7 +64,7 @@ class TeXFontDefinition {
};
TeXFontDefinition(QString nfontname, double _displayResolution_in_dpi, quint32 chk, qint32 _scaled_size_in_DVI_units,
TeXFontDefinition(const QString &nfontname, double _displayResolution_in_dpi, quint32 chk, qint32 _scaled_size_in_DVI_units,
class fontPool *pool, double _enlargement);
~TeXFontDefinition();

View file

@ -18,7 +18,7 @@
quint8 bigEndianByteReader::readUINT8()
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
// necessary for virtual fonts, which do not end with EOP.
if (command_pointer >= end_pointer) {
#ifdef DEBUG_ENDIANREADER
kError(kvs::dvi) << "bigEndianByteReader::readUINT8() tried to read past end of data chunk" << endl;
@ -34,7 +34,7 @@ quint8 bigEndianByteReader::readUINT8()
quint16 bigEndianByteReader::readUINT16()
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
// necessary for virtual fonts, which do not end with EOP.
if (command_pointer >= end_pointer)
return EOP;
@ -47,7 +47,7 @@ quint16 bigEndianByteReader::readUINT16()
quint32 bigEndianByteReader::readUINT32()
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
// necessary for virtual fonts, which do not end with EOP.
if (command_pointer >= end_pointer)
return EOP;
@ -62,7 +62,7 @@ quint32 bigEndianByteReader::readUINT32()
void bigEndianByteReader::writeUINT32(quint32 a)
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
// necessary for virtual fonts, which do not end with EOP.
if (command_pointer >= end_pointer)
return;
@ -81,7 +81,7 @@ void bigEndianByteReader::writeUINT32(quint32 a)
quint32 bigEndianByteReader::readUINT(quint8 size)
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
// necessary for virtual fonts, which do not end with EOP.
if (command_pointer >= end_pointer)
return EOP;
@ -96,7 +96,7 @@ quint32 bigEndianByteReader::readUINT(quint8 size)
qint32 bigEndianByteReader::readINT(quint8 length)
{
// This check saveguards us against segmentation fault. It is also
// necessary for virtual fonts, which do not end whith EOP.
// necessary for virtual fonts, which do not end with EOP.
if (command_pointer >= end_pointer)
return EOP;

View file

@ -51,7 +51,7 @@ class bigEndianByteReader {
/** Similar to the method above, only that the method reads a big
endian number of length size, where 1 <= size <= 4. Note that
the value 3 is allowed (and is acually used in DVI files)!!! */
the value 3 is allowed (and is actually used in DVI files)!!! */
quint32 readUINT(quint8 size);
/** Similar to the method above, only that the method reads a SIGNED

View file

@ -69,7 +69,7 @@
dvifile::dvifile(const dvifile *old, fontPool *fp)
{
errorMsg = QString::null;
errorMsg.clear();
errorCounter = 0;
page_offset = 0;
suggestedPageSize = 0;
@ -269,7 +269,7 @@ dvifile::dvifile(const QString& fname, fontPool* pool)
kDebug(kvs::dvi) << "init_dvi_file: " << fname << endl;
#endif
errorMsg = QString::null;
errorMsg.clear();
errorCounter = 0;
page_offset = 0;
suggestedPageSize = 0;
@ -381,7 +381,7 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms
if (!pdf2ps.waitForStarted()) {
// Indicates that conversion failed, won't try again.
convertedFiles[PDFFilename] = QString::null;
convertedFiles[PDFFilename].clear();
if (converrorms != 0 && !have_complainedAboutMissingPDF2PS) {
*converrorms = i18n("<qt><p>The external program <strong>pdf2ps</strong> could not be started. As a result, "
"the PDF-file %1 could not be converted to PostScript. Some graphic elements in your "
@ -395,7 +395,7 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms
"from the command line to check if it really works.</p><p><b>PATH:</b> %2</p></qt>", PDFFilename, getenv("PATH"));
have_complainedAboutMissingPDF2PS = true;
}
return QString::null;
return QString();
}
// We wait here while the external program runs concurrently.
@ -403,7 +403,7 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms
if (!QFile::exists(convertedFileName) || pdf2ps.exitCode() != 0) {
// Indicates that conversion failed, won't try again.
convertedFiles[PDFFilename] = QString::null;
convertedFiles[PDFFilename].clear();
if (converrorms != 0) {
const QString output = pdf2ps.readAll();
@ -413,7 +413,7 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename, QString *converrorms
"This is the output of the <strong>pdf2ps</strong> program that KDVI used:</p>"
"<p><strong>%2</strong></p></qt>", PDFFilename, output);
}
return QString::null;
return QString();
}
// Save name of converted file to buffer, so PDF file won't be
// converted again, and files can be deleted when *this is

View file

@ -170,7 +170,7 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page)
QImage img(pageWidth, pageHeight, QImage::Format_RGB32);
foreGroundPainter = new QPainter(&img);
if (foreGroundPainter != 0) {
errorMsg = QString::null;
errorMsg.clear();
draw_page();
delete foreGroundPainter;
foreGroundPainter = 0;
@ -231,7 +231,7 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page)
i18n("<qt><strong>File corruption</strong> KDVI could not interprete your DVI file. This is "
"most commonly caused by a corrupted file.</qt>"),
errorMsg, i18n("DVI File Error"));
errorMsg = QString::null;
errorMsg.clear();
currentlyDrawnPage = 0;
return;
}
@ -331,7 +331,7 @@ void dviRenderer::embedPostScript()
return;
/* embedPS_progress = new KProgressDialog(parentWidget,
i18n("Embedding PostScript Files"), QString::null, true); */
i18n("Embedding PostScript Files"), QString(), true); */
if (!embedPS_progress)
return;
embedPS_progress->setAllowCancel(false);
@ -342,7 +342,7 @@ void dviRenderer::embedPostScript()
embedPS_numOfProgressedFiles = 0;
quint16 currPageSav = current_page;
errorMsg = QString::null;
errorMsg.clear();
for(current_page=0; current_page < dviFile->total_pages; current_page++) {
if (current_page < dviFile->total_pages) {
command_pointer = dviFile->dvi_Data() + dviFile->page_offset[int(current_page)];
@ -362,11 +362,11 @@ void dviRenderer::embedPostScript()
if (!errorMsg.isEmpty()) {
errorMsg = "<qt>" + errorMsg + "</qt>";
// KMessageBox::detailedError(parentWidget, "<qt>" + i18n("Not all PostScript files could be embedded into your document.") + "</qt>", errorMsg);
errorMsg = QString::null;
errorMsg.clear();
} else
/* KMessageBox::information(parentWidget, "<qt>" + i18n("All external PostScript files were embedded into your document. You "
"will probably want to save the DVI file now.") + "</qt>",
QString::null, "embeddingDone");*/
QString(), "embeddingDone");*/
// Prescan phase starts here
#ifdef PERFORMANCE_MEASUREMENT
@ -707,7 +707,7 @@ void dviRenderer::setResolution(double resolution_in_DPI)
void dviRenderer::clearStatusBar()
{
//emit setStatusBarText( QString::null );
//emit setStatusBarText( QString() );
}

View file

@ -164,7 +164,7 @@ void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
break;
case 0x7b:
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += "-";
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += '-';
break;
case 0x7c:
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += "---";
@ -173,7 +173,7 @@ void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += "\"";
break;
case 0x7e:
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += "~";
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += '~';
break;
case 0x7f:
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += "@@"; // @@@ check!
@ -183,7 +183,7 @@ void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
if ((ch >= 0x21) && (ch <= 0x7a))
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += QChar(ch);
else
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += "?";
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += '?';
break;
}

View file

@ -147,7 +147,7 @@ void dviRenderer::prescan_embedPS(char *cp, quint8 *beginningOfSpecialCommand)
QTextStream stream( &file );
while ( !stream.atEnd() ) {
PS += stream.readLine().section( '%', 0, 0);
PS += "\n";
PS += '\n';
}
file.close();
}

View file

@ -105,7 +105,7 @@ fontMap::fontMap()
if (encodingName.endsWith(".enc"))
entry.fontEncoding = encodingName;
else
entry.fontEncoding = QString::null;
entry.fontEncoding.clear();
}
file.close();
} else
@ -131,7 +131,7 @@ const QString &fontMap::findFileName(const QString &TeXName)
if (it != fontMapEntries.end())
return it.value().fontFileName;
static const QString nullstring(QString::null);
static const QString nullstring;
return nullstring;
}
@ -143,7 +143,7 @@ const QString &fontMap::findFontName(const QString &TeXName)
if (it != fontMapEntries.end())
return it.value().fullFontName;
static const QString nullstring(QString::null);
static const QString nullstring;
return nullstring;
}
@ -155,7 +155,7 @@ const QString &fontMap::findEncoding(const QString &TeXName)
if (it != fontMapEntries.end())
return it.value().fontEncoding;
static const QString nullstring(QString::null);
static const QString nullstring;
return nullstring;
}

View file

@ -52,7 +52,7 @@ fontPool::fontPool()
displayResolution_in_dpi = 100.0; // A not-too-bad-default
useFontHints = true;
CMperDVIunit = 0;
extraSearchPath = QString::null;
extraSearchPath.clear();
fontList.setAutoDelete(true);
#ifdef HAVE_FREETYPE
@ -245,7 +245,7 @@ bool fontPool::areFontsLocated()
void fontPool::locateFonts()
{
kpsewhichOutput = QString::null;
kpsewhichOutput.clear();
// First, we try and find those fonts which exist on disk
// already. If virtual fonts are found, they will add new fonts to
@ -334,7 +334,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// a real command line, but who cares?
const QString kpsewhich_exe = "kpsewhich";
kpsewhichOutput +=
"<p><b>" + kpsewhich_exe + " " + kpsewhich_args.join(" ") + "</b></p>";
"<p><b>" + kpsewhich_exe + ' ' + kpsewhich_args.join(" ") + "</b></p>";
const QString importanceOfKPSEWHICH =
i18n("<p>KDVI relies on the <b>kpsewhich</b> program to locate font files "

View file

@ -27,7 +27,7 @@
*
* This class holds a list of fonts and is able to perform a number of
* functions on each of the fonts. The main use of this class is that
* it is able to control a concurrently running "kpsewhich" programm
* it is able to control a concurrently running "kpsewhich" program
* which is used to locate and load the fonts.
*
* @author Stefan Kebekus <kebekus@kde.org>
@ -123,7 +123,7 @@ public:
configuration of QT at compile and runtime or the availability
of the XFt extension, alpha channels are either supported, or
silently converted to 1-bit masks. The redering routines in the
TeXFont implementation use this flag to choose the apropriate
TeXFont implementation use this flag to choose the appropriated
drawing routines for the different setups. */
bool QPixmapSupportsAlpha;

View file

@ -263,7 +263,7 @@ QString pageSize::formatName() const
if (currentSize >= 0)
return staticList[currentSize].name;
else
return QString::null;
return QString();
}
@ -311,7 +311,7 @@ QString pageSize::serialize() const
QString pageSize::description() const
{
if (!isValid())
return QString::null;
return QString();
QString size = " ";
if (formatNumber() == -1) {
@ -320,13 +320,13 @@ QString pageSize::description() const
else
size += QString("%1x%2 in").arg(width().getLength_in_inch(), 0, 'g', 2).arg(height().getLength_in_inch(), 0, 'g', 2);
} else {
size += formatName() + "/";
size += formatName() + '/';
if (getOrientation() == 0)
size += i18n("portrait");
else
size += i18n("landscape");
}
return size+" ";
return size + ' ';
}

View file

@ -29,7 +29,7 @@ The main difference to the SimplePageSize class are the following.
page width and height. Several units (inch, millimeters,
centimeters) are possible.
- It is made sure that page width an hight are always in a resonable
- It is made sure that page width an hight are always in a reasonable
range, which is currently set to 5cm .. 50cm
- The default constructor provides a locale-depending default.

View file

@ -34,7 +34,7 @@ the DVI prescan routines.
class PreBookmark
{
public:
PreBookmark() {title=QString::null; anchorName=QString::null; noOfChildren=0;}
PreBookmark() {title.clear(); anchorName.clear(); noOfChildren=0;}
PreBookmark(const QString& t, const QString& a, quint16 n) {title=t; anchorName=a; noOfChildren=n;}
// Title of the bookmark

View file

@ -22,7 +22,7 @@ class QString;
class QStringList;
/** \brief This class represents phyiscal page sizes.
/** \brief This class represents physical page sizes.
This class represents page sizes. It contains nothing but two numbers,
the page width, and page height, and a few utility functions that

View file

@ -6,11 +6,11 @@
WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
to anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing. Refer
to the GNU General Public Licence for full details.
to the GNU General Public License for full details.
Everyone is granted permission to copy, modify and redistribute this
file, but only under the conditions described in the GNU General
Public Licence. A copy of this license is supposed to have been given
Public License. A copy of this license is supposed to have been given
to you along with this file so you can know your rights and
responsibilities. It should be in a file named COPYING. Among other
things, the copyright notice and this notice must be preserved on all

View file

@ -6,11 +6,11 @@
WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
to anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says so in writing. Refer
to the GNU General Public Licence for full details.
to the GNU General Public License for full details.
Everyone is granted permission to copy, modify and redistribute this
file, but only under the conditions described in the GNU General
Public Licence. A copy of this license is supposed to have been given
Public License. A copy of this license is supposed to have been given
to you along with this file so you can know your rights and
responsibilities. It should be in a file named COPYING. Among other
things, the copyright notice and this notice must be preserved on all

View file

@ -263,7 +263,7 @@ bool PDFGenerator::loadDocument( const QString & filePath, QVector<Okular::Page*
bool keep = true;
while ( pdfdoc && pdfdoc->isLocked() )
{
QByteArray password;
QString password;
// 1.A. try to retrieve the first password from the kde wallet system
if ( !triedWallet )
@ -280,7 +280,7 @@ bool PDFGenerator::loadDocument( const QString & filePath, QVector<Okular::Page*
// look for the pass in that folder
QString retrievedPass;
if ( !wallet->readPassword( filePath.section('/', -1, -1), retrievedPass ) )
password = retrievedPass.toLocal8Bit();
password = retrievedPass;
}
triedWallet = true;
}
@ -296,18 +296,18 @@ bool PDFGenerator::loadDocument( const QString & filePath, QVector<Okular::Page*
firstInput = false;
// if the user presses cancel, abort opening
if ( KPasswordDialog::getPassword( 0, password, i18n( "Document Password" ), prompt, wallet ? &keep : 0 ) != KPasswordDialog::Accepted )
password = KPasswordDialog::getPassword( prompt, i18n( "Document Password" ), wallet ? &keep : 0 );
if ( password.isNull() )
break;
}
// 2. reopen the document using the password
pdfdoc->unlock( password, password );
pdfdoc->unlock( password.toLocal8Bit(), password.toLocal8Bit() );
// 3. if the password is correct and the user chose to remember it, store it to the wallet
if ( !pdfdoc->isLocked() && wallet && /*safety check*/ wallet->isOpen() && keep )
{
QString goodPass = QString::fromLocal8Bit( password.data() );
wallet->writePassword( filePath.section('/', -1, -1), goodPass );
wallet->writePassword( filePath.section('/', -1, -1), password );
}
}
if ( !pdfdoc || pdfdoc->isLocked() )

View file

@ -192,7 +192,7 @@ namespace agg
// of (1 << S), that is, power of two. The data is NOT continuous in memory,
// so the only valid access method is operator [] or curr(), prev(), next()
//
// There reallocs occure only when the pool of pointers to blocks needs
// There reallocs occur only when the pool of pointers to blocks needs
// to be extended (it happens very rear). You can control the value
// of increment to reallocate the pointer buffer. See the second constructor.
// By default, the incremeent value equals (1 << S), i.e., the block size.