Commit f8c1e832 authored by Dirk Mueller's avatar Dirk Mueller

fix compile

svn path=/trunk/kdegraphics/kpdf/; revision=388502
parent d576e28a
......@@ -110,7 +110,7 @@ NormalizedRect * KPDFPage::findText( const QString & text, bool strictCase, Norm
// create a xpf's Unicode (unsigned int) array for the given text
const QChar * str = text.unicode();
int len = text.length();
Unicode u[ len ];
QMemArray<Unicode> u(len);
for (int i = 0; i < len; ++i)
u[i] = str[i].unicode();
......@@ -130,12 +130,12 @@ NormalizedRect * KPDFPage::findText( const QString & text, bool strictCase, Norm
while ( !found )
{
if ( dir == FromTop )
found = m_text->findText( u, len, gTrue, gTrue, gFalse, gFalse, &sLeft, &sTop, &sRight, &sBottom );
found = m_text->findText( const_cast<Unicode*>(static_cast<const Unicode*>(u)), len, gTrue, gTrue, gFalse, gFalse, &sLeft, &sTop, &sRight, &sBottom );
else if ( dir == NextMatch )
found = m_text->findText( u, len, gFalse, gTrue, gTrue, gFalse, &sLeft, &sTop, &sRight, &sBottom );
found = m_text->findText( const_cast<Unicode*>(static_cast<const Unicode*>(u)), len, gFalse, gTrue, gTrue, gFalse, &sLeft, &sTop, &sRight, &sBottom );
else if ( dir == PrevMatch )
// FIXME: this doesn't work as expected (luckily backward search isn't yet used)
found = m_text->findText( u, len, gTrue, gFalse, gFalse, gTrue, &sLeft, &sTop, &sRight, &sBottom );
found = m_text->findText( const_cast<Unicode*>(static_cast<const Unicode*>(u)), len, gTrue, gFalse, gFalse, gTrue, &sLeft, &sTop, &sRight, &sBottom );
// if not found (even in case unsensitive search), terminate
if ( !found )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment