#include <QTimer>
#include <boost/bind.hpp>
-#include <boost/current_function.hpp>
#ifdef Q_WS_X11
#include <QX11Info>
namespace lyx {
using support::FileName;
-using support::ForkedCallsController;
/// return the LyX mouse button state from Qt's
// PageStep only depends on the viewport height.
verticalScrollBar()->setPageStep(viewport()->height());
- LYXERR(Debug::GUI, BOOST_CURRENT_FUNCTION
- << "\n viewport width\t" << viewport()->width()
- << "\n viewport height\t" << viewport()->height());
+ LYXERR(Debug::GUI, "viewport width: " << viewport()->width()
+ << " viewport height: " << viewport()->height());
// Enables input methods for asian languages.
// Must be set when creating custom text editing widgets.
{
buffer_view_->buffer().workAreaManager().remove(this);
delete buffer_view_;
+ delete cursor_;
}
// Use this opportunity to deal with any child processes that
// have finished but are waiting to communicate this fact
// to the rest of LyX.
- ForkedCallsController & fcc = ForkedCallsController::get();
- fcc.handleCompletedProcesses();
+ support::ForkedCallsController::handleCompletedProcesses();
}
#ifdef Q_WS_X11
if (XEventsQueued(QX11Info::display(), 0) > 1 && ev->isAutoRepeat()
&& (Qt::Key_PageDown || Qt::Key_PageUp)) {
- LYXERR(Debug::KEY, BOOST_CURRENT_FUNCTION
- << "\nsystem is busy: scroll key event ignored");
+ LYXERR(Debug::KEY, "system is busy: scroll key event ignored");
ev->ignore();
return;
}
#endif
- LYXERR(Debug::KEY, BOOST_CURRENT_FUNCTION
- << " count=" << ev->count()
- << " text=" << fromqstr(ev->text())
- << " isAutoRepeat=" << ev->isAutoRepeat()
- << " key=" << ev->key());
+ LYXERR(Debug::KEY, " count: " << ev->count()
+ << " text: " << fromqstr(ev->text())
+ << " isAutoRepeat: " << ev->isAutoRepeat() << " key: " << ev->key());
KeySymbol sym;
setKeySymbol(&sym, ev);
void GuiWorkArea::paintEvent(QPaintEvent * ev)
{
QRect const rc = ev->rect();
- /*
- LYXERR(Debug::PAINTING) << "paintEvent begin: x: " << rc.x()
- << " y: " << rc.y()
- << " w: " << rc.width()
- << " h: " << rc.height() << endl;
- */
+ // LYXERR(Debug::PAINTING, "paintEvent begin: x: " << rc.x()
+ // << " y: " << rc.y() << " w: " << rc.width() << " h: " << rc.height());
if (need_resize_) {
verticalScrollBar()->setPageStep(viewport()->height());
if (!commit_string.isEmpty()) {
- LYXERR(Debug::KEY, BOOST_CURRENT_FUNCTION
- << " preeditString =" << fromqstr(e->preeditString())
- << " commitString =" << fromqstr(e->commitString()));
+ LYXERR(Debug::KEY, "preeditString: " << fromqstr(e->preeditString())
+ << " commitString: " << fromqstr(e->commitString()));
int key = 0;
// FIXME Iwami 04/01/07: we should take care also of UTF16 surrogates here.
- for (int i = 0; i < commit_string.size(); ++i) {
+ for (int i = 0; i != commit_string.size(); ++i) {
QKeyEvent ev(QEvent::KeyPress, key, Qt::NoModifier, commit_string[i]);
keyPressEvent(&ev);
}
// cursor_pos : cursor position in preedit string.
size_t cursor_pos = 0;
bool cursor_is_visible = false;
- for (int i = 0; i < att.size(); ++i) {
+ for (int i = 0; i != att.size(); ++i) {
if (att.at(i).type == QInputMethodEvent::Cursor) {
cursor_pos = att.at(i).start;
cursor_is_visible = att.at(i).length != 0;
// rLength : selected string length in IM.
size_t rLength = 0;
if (cursor_pos < preedit_length) {
- for (int i = 0; i < att.size(); ++i) {
+ for (int i = 0; i != att.size(); ++i) {
if (att.at(i).type == QInputMethodEvent::TextFormat) {
if (att.at(i).start <= int(cursor_pos)
&& int(cursor_pos) < att.at(i).start + att.at(i).length) {