Commit 28760927 authored by Kristian Høgsberg's avatar Kristian Høgsberg

2005-05-04 Kristian Høgsberg <krh@redhat.com>

        Patches from Albert Astals Cid:

        * qt/poppler-page.cc (getText): Use QString::fromUtf8() instead of
        implicit latin1 cast constructor.

        * qt/test-poppler-qt.cpp (main): Use a QLabel for showing text
        instead of qDebug.
parent fd365223
2005-05-04 Kristian Høgsberg <krh@redhat.com>
Patches from Albert Astals Cid:
* qt/poppler-page.cc (getText): Use QString::fromUtf8() instead of
implicit latin1 cast constructor.
* qt/test-poppler-qt.cpp (main): Use a QLabel for showing text
instead of qDebug.
Wed May 4 02:31:05 2005 Jonathan Blandford <jrb@redhat.com>
* glib/poppler-document.cc:
......
......@@ -98,9 +98,8 @@ QString Page::getText(const Rectangle &r) const
s = output_dev->getText(r.m_x1, y1, r.m_x2, y2);
}
// TODO look if QString::fromUTF8 yields better results
result = s->getCString();
result = QString::fromUtf8(s->getCString());
delete output_dev;
delete s;
return result;
......
......@@ -76,8 +76,12 @@ int main( int argc, char **argv )
else
{
Poppler::Page *page = doc->getPage(0);
qDebug(page->getText(Poppler::Rectangle()));
QLabel *l = new QLabel(page->getText(Poppler::Rectangle()), 0);
l->show();
a.setMainWidget(l); // set main widget
delete page;
delete doc;
return a.exec();
}
}
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