diff --git a/src/frontends/qt2/BulletsModule.C b/src/frontends/qt2/BulletsModule.C index 884c71d771..936c9ca967 100644 --- a/src/frontends/qt2/BulletsModule.C +++ b/src/frontends/qt2/BulletsModule.C @@ -33,7 +33,7 @@ BulletsModule::BulletsModule(QWidget * parent, char const * name, WFlags fl) for (int iter = 0; iter < 4; ++iter) { bullets_[iter] = ITEMIZE_DEFAULTS[iter]; } - + QPopupMenu * pm = new QPopupMenu(this); QPopupMenu * pm1 = new QPopupMenu(pm); @@ -170,7 +170,7 @@ void BulletsModule::setBullet(int font, int character) { activeitem_->setText(0,""); activeitem_->setPixmap(0,getPixmap(font,character)); - + activebullet_->setFont(font); activebullet_->setCharacter(character); } @@ -180,7 +180,7 @@ void BulletsModule::setBullet(string text) { activeitem_->setPixmap(0, QPixmap()); activeitem_->setText(0, toqstr(text)); - + activebullet_->setText(text); } @@ -240,7 +240,7 @@ void BulletsModule::ding2(int row, int col) void BulletsModule::ding3(int row, int col) { setBullet(4,6*row + col); -} +} void BulletsModule::ding4(int row, int col) diff --git a/src/frontends/qt2/BulletsModule.h b/src/frontends/qt2/BulletsModule.h index b6f8e01946..a7d6c8df5b 100644 --- a/src/frontends/qt2/BulletsModule.h +++ b/src/frontends/qt2/BulletsModule.h @@ -34,7 +34,7 @@ public: void setBullet(int level, const Bullet & bullet); /// Bullet getBullet(int level); - + protected slots: /// void standard(int row, int col); @@ -54,7 +54,7 @@ protected slots: void setActive(QListViewItem*); /// set size void setSize(int size); - + private: /// get the pixmap that matches font/character QPixmap getPixmap(int font, int character); @@ -72,7 +72,7 @@ private: QListViewItem * activeitem_; /// store results boost::array bullets_; - + QBrowseBox * standard_; QBrowseBox * maths_; QBrowseBox * ding1_; diff --git a/src/frontends/qt2/QBibtex.C b/src/frontends/qt2/QBibtex.C index 7fe9119411..4eca11fdb9 100644 --- a/src/frontends/qt2/QBibtex.C +++ b/src/frontends/qt2/QBibtex.C @@ -71,7 +71,7 @@ void QBibtex::update_contents() if (!bib.empty()) dialog_->databaseLB->insertItem(toqstr(bib)); } - + dialog_->addBibCB->clear(); vector const bib_str = getVectorFromString( diff --git a/src/frontends/qt2/QBibtexDialog.C b/src/frontends/qt2/QBibtexDialog.C index b21cda2895..7357ef5fc6 100644 --- a/src/frontends/qt2/QBibtexDialog.C +++ b/src/frontends/qt2/QBibtexDialog.C @@ -69,9 +69,9 @@ void QBibtexDialog::browsePressed() } } - if (!present) + if (!present) styleCB->insertItem(toqstr(filen),0); - + styleCB->setCurrentItem(pres); form_->changed(); } diff --git a/src/frontends/qt2/QDocument.C b/src/frontends/qt2/QDocument.C index e5df281018..6b261c589f 100644 --- a/src/frontends/qt2/QDocument.C +++ b/src/frontends/qt2/QDocument.C @@ -144,7 +144,7 @@ void QDocument::build_dialog() dialog_->layoutModule->pagestyleCO->insertItem(qt_("plain")); dialog_->layoutModule->pagestyleCO->insertItem(qt_("headings")); dialog_->layoutModule->pagestyleCO->insertItem(qt_("fancy")); - + dialog_->layoutModule->lspacingCO->insertItem( qt_("Single"), Spacing::Single); dialog_->layoutModule->lspacingCO->insertItem( @@ -244,7 +244,7 @@ void QDocument::apply() // layout params.textclass = dialog_->layoutModule->classCO->currentItem(); - + params.fonts = fromqstr(dialog_->layoutModule->fontsCO->currentText()); @@ -253,7 +253,7 @@ void QDocument::apply() params.pagestyle = fromqstr(dialog_->layoutModule->pagestyleCO->currentText()); - + switch (dialog_->layoutModule->lspacingCO->currentItem()) { case 0: params.spacing.set(Spacing::Single); @@ -345,8 +345,8 @@ void QDocument::apply() margin = margin - 1; } params.paperpackage = char(margin); - - // set params.papersize from params.papersize2 + + // set params.papersize from params.papersize2 // and params.paperpackage params.setPaperStuff(); @@ -436,7 +436,7 @@ void QDocument::update_contents() dialog_->langModule->quoteStyleCO->setCurrentItem( params.quotes_language); - + dialog_->langModule->defaultencodingCB->setChecked(true); if (params.inputenc != "auto") { diff --git a/src/frontends/qt2/QDocumentDialog.C b/src/frontends/qt2/QDocumentDialog.C index 700375ef24..960167b63e 100644 --- a/src/frontends/qt2/QDocumentDialog.C +++ b/src/frontends/qt2/QDocumentDialog.C @@ -239,7 +239,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form) connect(paperModule->facingPagesCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor())); - // bullets + // bullets connect(bulletsModule->bulletsizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor())); connect(bulletsModule->bulletsLV, SIGNAL(selectionChanged()), diff --git a/src/frontends/qt2/QIncludeDialog.C b/src/frontends/qt2/QIncludeDialog.C index d62bdbbe23..9be8787bd1 100644 --- a/src/frontends/qt2/QIncludeDialog.C +++ b/src/frontends/qt2/QIncludeDialog.C @@ -72,7 +72,7 @@ void QIncludeDialog::typeChanged(int v) previewCB->setEnabled(false); previewCB->setChecked(false); break; - + default: visiblespaceCB->setEnabled(true); previewCB->setEnabled(false); diff --git a/src/frontends/qt2/QLPopupMenu.C b/src/frontends/qt2/QLPopupMenu.C index 61ac374a2a..db023eb4a3 100644 --- a/src/frontends/qt2/QLPopupMenu.C +++ b/src/frontends/qt2/QLPopupMenu.C @@ -97,7 +97,7 @@ void QLPopupMenu::populate(Menu * menu) res.second->populate(m->submenu()); } else { FuncStatus const status = m->status(); - + insertItem(toqstr(getLabel(*m)), m->action()); setItemEnabled(m->action(), !status.disabled()); setItemChecked(m->action(), status.onoff(true)); diff --git a/src/frontends/qt2/QLyXKeySym.C b/src/frontends/qt2/QLyXKeySym.C index 20cdc9c863..dcfa37d112 100644 --- a/src/frontends/qt2/QLyXKeySym.C +++ b/src/frontends/qt2/QLyXKeySym.C @@ -125,7 +125,7 @@ bool QLyXKeySym::isOK() const return ok; } - + bool QLyXKeySym::isModifier() const { bool const mod(q_is_modifier(key_)); @@ -163,12 +163,12 @@ bool QLyXKeySym::isText() const } QChar const c(text_[0]); - lyxerr[Debug::KEY] << "isText for key " << key_ + lyxerr[Debug::KEY] << "isText for key " << key_ << " isPrint is " << c.isPrint() << endl; return c.isPrint(); } - + bool operator==(LyXKeySym const & k1, LyXKeySym const & k2) { QLyXKeySym const & q1(static_cast(k1)); diff --git a/src/frontends/qt2/QLyXKeySym.h b/src/frontends/qt2/QLyXKeySym.h index 2b900fe5d0..351401eeaf 100644 --- a/src/frontends/qt2/QLyXKeySym.h +++ b/src/frontends/qt2/QLyXKeySym.h @@ -49,7 +49,7 @@ public: /// Is this normal insertable text ? (last ditch attempt only) virtual bool isText() const; - + /** * Return the value of the keysym into the local ISO encoding. * This converts the LyXKeySym to a 8-bit encoded character. diff --git a/src/frontends/qt2/QPrefs.C b/src/frontends/qt2/QPrefs.C index 43e2365d4c..fb06d6383f 100644 --- a/src/frontends/qt2/QPrefs.C +++ b/src/frontends/qt2/QPrefs.C @@ -382,7 +382,7 @@ void QPrefs::update_contents() QPrefIdentityModule * idmod(dialog_->identityModule); idmod->nameED->setText(toqstr(rc.user_name)); idmod->emailED->setText(toqstr(rc.user_email)); - + QPrefKeyboardModule * keymod(dialog_->keyboardModule); diff --git a/src/frontends/qt2/QSearchDialog.C b/src/frontends/qt2/QSearchDialog.C index d69d71e475..26c9e0c04b 100644 --- a/src/frontends/qt2/QSearchDialog.C +++ b/src/frontends/qt2/QSearchDialog.C @@ -34,9 +34,9 @@ void uniqueInsert(QComboBox * box, QString const & text) box->insertItem(text); } - + }; - + QSearchDialog::QSearchDialog(QSearch * form) : QSearchDialogBase(0, 0, false, 0), diff --git a/src/frontends/qt2/QSpellchecker.C b/src/frontends/qt2/QSpellchecker.C index 8b9d6ceeaf..d0e57c75fb 100644 --- a/src/frontends/qt2/QSpellchecker.C +++ b/src/frontends/qt2/QSpellchecker.C @@ -69,7 +69,7 @@ void QSpellchecker::replace() void QSpellchecker::partialUpdate(int s) { - ControlSpellchecker::State const state = + ControlSpellchecker::State const state = static_cast(s); switch (state) { diff --git a/src/frontends/qt2/QSpellcheckerDialog.h b/src/frontends/qt2/QSpellcheckerDialog.h index 029551a3a4..8b82554a80 100644 --- a/src/frontends/qt2/QSpellcheckerDialog.h +++ b/src/frontends/qt2/QSpellcheckerDialog.h @@ -23,7 +23,7 @@ public: QSpellcheckerDialog(QSpellchecker * form); public slots: virtual void suggestionChanged(const QString &); - + protected slots: virtual void acceptClicked(); virtual void addClicked(); diff --git a/src/frontends/qt2/QURL.C b/src/frontends/qt2/QURL.C index 970250f463..14b522adfc 100644 --- a/src/frontends/qt2/QURL.C +++ b/src/frontends/qt2/QURL.C @@ -51,7 +51,7 @@ void QURL::update_contents() dialog_->urlED->setText(toqstr(params.getContents())); dialog_->nameED->setText(toqstr(params.getOptions())); dialog_->hyperlinkCB->setChecked(params.getCmdName() != "url"); - + bc().valid(isValid()); } diff --git a/src/frontends/qt2/lyx_gui.C b/src/frontends/qt2/lyx_gui.C index eecc425a57..bc39179d47 100644 --- a/src/frontends/qt2/lyx_gui.C +++ b/src/frontends/qt2/lyx_gui.C @@ -183,7 +183,7 @@ void lyx_gui::exit() // into a static dialog return in the lyx code (for example, // load autosave file QMessageBox. We have to just get the hell // out. - + ::exit(0); } diff --git a/src/frontends/qt2/qfont_loader.C b/src/frontends/qt2/qfont_loader.C index 250c6bd2b8..abb6119217 100644 --- a/src/frontends/qt2/qfont_loader.C +++ b/src/frontends/qt2/qfont_loader.C @@ -351,7 +351,7 @@ qfont_loader::font_info * qfont_loader::getfontinfo(LyXFont const & f) font_info * fi = fontinfo_[f.family()][f.series()][f.realShape()][f.size()]; if (fi) return fi; - + font_info * fi2 = new font_info(f); fontinfo_[f.family()][f.series()][f.realShape()][f.size()] = fi2; return fi2; @@ -371,7 +371,7 @@ int qfont_loader::charwidth(LyXFont const & f, Uchar val) return w; } - + bool qfont_loader::available(LyXFont const & f) { if (!lyxrc.use_gui) diff --git a/src/frontends/qt2/qfont_loader.h b/src/frontends/qt2/qfont_loader.h index d7c58b5f57..2fce60c5a4 100644 --- a/src/frontends/qt2/qfont_loader.h +++ b/src/frontends/qt2/qfont_loader.h @@ -14,13 +14,13 @@ #include - + #include "encoding.h" #include "lyxfont.h" #include #include - + /** * Qt font loader for LyX. Matches LyXFonts against * actual QFont instances, and also caches metrics. @@ -59,7 +59,7 @@ private: QFontMetrics metrics; typedef std::map WidthCache; - /// cache of char widths + /// cache of char widths WidthCache widthcache; }; diff --git a/src/frontends/qt2/qfont_metrics.C b/src/frontends/qt2/qfont_metrics.C index 93bf5635b8..7fecadac95 100644 --- a/src/frontends/qt2/qfont_metrics.C +++ b/src/frontends/qt2/qfont_metrics.C @@ -21,7 +21,7 @@ #include #include - + namespace { QFontMetrics const & metrics(LyXFont const & f) @@ -29,12 +29,12 @@ QFontMetrics const & metrics(LyXFont const & f) return fontloader.metrics(f); } - + int charwidth(Uchar val, LyXFont const & f) { if (!lyxrc.use_gui) return 1; - return fontloader.charwidth(f, val); + return fontloader.charwidth(f, val); } } // namespace anon @@ -104,7 +104,7 @@ Encoding const * fontencoding(LyXFont const & f) encoding = encodings.symbol_encoding(); return encoding; } - + int smallcapswidth(char const * s, size_t ls, LyXFont const & f) { @@ -119,7 +119,7 @@ int smallcapswidth(char const * s, size_t ls, LyXFont const & f) QFontMetrics const & qsmallm = fontloader.metrics(smallfont); Encoding const * encoding(fontencoding(f)); - + int w = 0; for (size_t i = 0; i < ls; ++i) { @@ -132,7 +132,7 @@ int smallcapswidth(char const * s, size_t ls, LyXFont const & f) } return w; } - + int width(char const * s, size_t ls, LyXFont const & f) { @@ -142,7 +142,7 @@ int width(char const * s, size_t ls, LyXFont const & f) if (f.realShape() == LyXFont::SMALLCAPS_SHAPE) { return smallcapswidth(s, ls, f); } - + Encoding const * encoding(fontencoding(f)); if (ls == 1) { @@ -150,11 +150,11 @@ int width(char const * s, size_t ls, LyXFont const & f) } int w = 0; - + for (size_t i = 0; i < ls; ++i) { w += charwidth(encoding->ucs(s[i]), f); } - + return w; } diff --git a/src/frontends/qt2/qgridview.C b/src/frontends/qt2/qgridview.C index 117a0ea4c4..af882eb68c 100644 --- a/src/frontends/qt2/qgridview.C +++ b/src/frontends/qt2/qgridview.C @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id: qgridview.C,v 1.1 2003/01/13 10:39:18 larsbj Exp $ +** $Id: qgridview.C,v 1.2 2003/02/25 13:35:26 leeming Exp $ ** ** Implementation of QGridView class ** @@ -146,7 +146,7 @@ void QGridView::setCellWidth( int cellWidth ) cellw = cellWidth; updateGrid(); updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() ); - + } /*! \property QGridView::cellHeight @@ -161,7 +161,7 @@ void QGridView::setCellHeight( int cellHeight ) cellh = cellHeight; updateGrid(); updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() ); - + } /*! diff --git a/src/frontends/qt2/qtTimeout.h b/src/frontends/qt2/qtTimeout.h index 649df71d40..a94e9d1742 100644 --- a/src/frontends/qt2/qtTimeout.h +++ b/src/frontends/qt2/qtTimeout.h @@ -13,7 +13,7 @@ #define QTTIMEOUT_H #include "frontends/Timeout.h" -#include +#include // stupid Qt #undef emit diff --git a/src/frontends/qt2/qt_helpers.C b/src/frontends/qt2/qt_helpers.C index aa49aa9bf7..ebd844a7de 100644 --- a/src/frontends/qt2/qt_helpers.C +++ b/src/frontends/qt2/qt_helpers.C @@ -14,9 +14,9 @@ #include "support/lstrings.h" #include "gettext.h" #include "qt_helpers.h" - + #include "lengthcombo.h" - + #include #include #include @@ -53,7 +53,7 @@ pair parseFontName(string const & name) #endif } - + string widgetsToLength(QLineEdit const * input, LengthCombo const * combo) { QString length = input->text(); diff --git a/src/frontends/qt2/qt_helpers.h b/src/frontends/qt2/qt_helpers.h index d4f654c8b9..39e791a3a0 100644 --- a/src/frontends/qt2/qt_helpers.h +++ b/src/frontends/qt2/qt_helpers.h @@ -18,22 +18,22 @@ #include #include "lyxlength.h" - + class LengthCombo; class QLineEdit; class QString; - + string makeFontName(string const & family, string const & foundry); - + std::pair parseFontName(string const & name); /// method to get a LyXLength from widgets string widgetsToLength(QLineEdit const * input, LengthCombo const * combo); - + /// method to set widgets from a LyXLength void lengthToWidgets(QLineEdit * input, LengthCombo * combo, string const & len, LyXLength::UNIT default_unit); - + /** * toqstr - convert char * into unicode *