]> git.lyx.org Git - features.git/commitdiff
Converted '#warning ...' into FIXME-comments
authorChristian Ridderström <christian.ridderstrom@gmail.com>
Fri, 10 Aug 2007 11:47:12 +0000 (11:47 +0000)
committerChristian Ridderström <christian.ridderstrom@gmail.com>
Fri, 10 Aug 2007 11:47:12 +0000 (11:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19397 a592a061-630c-0410-9148-cb99ea01b6c8

27 files changed:
src/Buffer.cpp
src/Counters.cpp
src/Cursor.cpp
src/LyXFunc.cpp
src/ParIterator.cpp
src/Paragraph.cpp
src/Text.cpp
src/Text2.cpp
src/Text3.cpp
src/Trans.cpp
src/factory.cpp
src/frontends/qt4/QPrefs.cpp
src/frontends/qt4/QWrap.cpp
src/insets/InsetGraphicsParams.cpp
src/insets/InsetInclude.cpp
src/insets/InsetTabular.cpp
src/insets/InsetTheorem.cpp
src/mathed/InsetFormulaMacro.cpp
src/mathed/InsetMath.cpp
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathNest.cpp
src/mathed/MathData.cpp
src/mathed/MathMacroTemplate.cpp
src/mathed/MathParser.cpp
src/support/copy.cpp
src/support/filetools.cpp
src/support/mkdir.cpp

index 8a52b65bc730657231a56477c4c49697f63e1d00..9777f3bd9bb73803d010aec959f3c24e281c57c4 100644 (file)
@@ -1613,9 +1613,7 @@ bool Buffer::isUnnamed() const
 }
 
 
-#ifdef WITH_WARNINGS
-#warning this function should be moved to buffer_pimpl.C
-#endif
+// FIXME: this function should be moved to buffer_pimpl.C
 void Buffer::markDirty()
 {
        if (pimpl_->lyx_clean) {
index a3db807959d5a15403d444465707aea47e256dfa..ac7c68394dd842cdf8cf1dbb412164988fec6aae 100644 (file)
@@ -349,9 +349,8 @@ docstring Counters::counterLabel(docstring const & format)
 {
        docstring label = format;
        while (true) {
-#ifdef WITH_WARNINGS
-#warning Using boost::regex or boost::spirit would make this code a lot simpler... (Lgb)
-#endif
+               // FIXME: Using boost::regex or boost::spirit would make
+               // FIXME: this code a lot simpler... (Lgb)
 
                size_t const i = label.find('\\', 0);
                if (i == docstring::npos)
index bb9b91dec66376db996f7130de1dcc06378a0203..7147f8152a0b1b358bdd62109ea417935003189e 100644 (file)
@@ -512,9 +512,7 @@ void Cursor::setSelection()
 {
        selection() = true;
        // A selection with no contents is not a selection
-#ifdef WITH_WARNINGS
-#warning doesnt look ok
-#endif
+       // FIXME: doesnt look ok
        if (pit() == anchor().pit() && pos() == anchor().pos())
                selection() = false;
 }
@@ -1012,9 +1010,7 @@ InsetMathUnknown * Cursor::activeMacro()
 
 void Cursor::pullArg()
 {
-#ifdef WITH_WARNINGS
-#warning Look here
-#endif
+       // FIXME: Look here
        MathData ar = cell();
        if (popLeft() && inMathed()) {
                plainErase();
@@ -1028,9 +1024,7 @@ void Cursor::pullArg()
 
 void Cursor::touch()
 {
-#ifdef WITH_WARNINGS
-#warning look here
-#endif
+       // FIXME: look here
 #if 0
        DocIterator::const_iterator it = begin();
        DocIterator::const_iterator et = end();
index e724ed0c78f6a7c3223113cacf2b43a5bd49dda3..19fd449c9d02918220d11c0d1da49175406915d7 100644 (file)
@@ -1598,9 +1598,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        theApp()->updateColor(lcolor.getFromLyXName(lyx_name));
 
                        if (graphicsbg_changed) {
-#ifdef WITH_WARNINGS
-#warning FIXME!! The graphics cache no longer has a changeDisplay method.
-#endif
+                               // FIXME: The graphics cache no longer has a changeDisplay method.
 #if 0
                                graphics::GCache::get().changeDisplay(true);
 #endif
index 80f35de25f89a58a37de5c5a551aff711dbe3802..867e86ca544d4c78a7e0d93e276ceac69e8dbb75 100644 (file)
@@ -67,9 +67,7 @@ ParIterator ParIterator::operator++(int)
 // should not be compiled/used. (Lgb)
 ParIterator & ParIterator::operator--()
 {
-#ifdef WITH_WARNINGS
-#warning look here
-#endif
+       // FIXME: look here
 //     DocIterator::backwardPar();
        return *this;
 }
@@ -179,9 +177,7 @@ bool operator!=(ParConstIterator const & iter1, ParConstIterator const & iter2)
 }
 
 
-#ifdef WITH_WARNINGS
-#warning const correctness!
-#endif
+// FIXME: const correctness!
 
 ParConstIterator par_const_iterator_begin(Inset const & inset)
 {
index a07f33eca7807fe6f508916e1a7cf98fd82a1a4d..1ec43ed1634621b2219c18c00520c8adbd5b7840 100644 (file)
@@ -751,12 +751,10 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
                        close = true;
                }
 
-#ifdef WITH_WARNINGS
-#warning Bug: we can have an empty font change here!
+// FIXME: Bug: we can have an empty font change here!
 // if there has just been a font change, we are going to close it
 // right now, which means stupid latex code like \textsf{}. AFAIK,
 // this does not harm dvi output. A minor bug, thus (JMarc)
-#endif
                // Some insets cannot be inside a font change command.
                // However, even such insets *can* be placed in \L or \R
                // or their equivalents (for RTL language switches), so we don't
@@ -2168,11 +2166,9 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
                                        runparams, basefont, basefont);
                }
 #else
-#ifdef WITH_WARNINGS
-//#warning For now we ALWAYS have to close the foreign font settings if they are
-//#warning there as we start another \selectlanguage with the next paragraph if
-//#warning we are in need of this. This should be fixed sometime (Jug)
-#endif
+//FIXME: For now we ALWAYS have to close the foreign font settings if they are
+//FIXME: there as we start another \selectlanguage with the next paragraph if
+//FIXME: we are in need of this. This should be fixed sometime (Jug)
                running_font.latexWriteEndChanges(os, bparams, runparams,
                                basefont, basefont);
 #endif
@@ -2404,9 +2400,7 @@ Paragraph::getParLanguage(BufferParams const & bparams) const
 {
        if (!empty())
                return getFirstFontSettings(bparams).language();
-#ifdef WITH_WARNINGS
-#warning FIXME we should check the prev par as well (Lgb)
-#endif
+       // FIXME: we should check the prev par as well (Lgb)
        return bparams.language;
 }
 
index f454a2fc608328614544780f8b2ccc4bb69bb2b4..c1dfaf15d2277bbcc9b7a2d71a965beb07d8d91d 100644 (file)
@@ -523,9 +523,7 @@ int Text::leftMargin(Buffer const & buffer, int max_width,
                // row in this paragraph.
                RowList::iterator rit = par.rows().begin();
                RowList::iterator end = par.rows().end();
-#ifdef WITH_WARNINGS
-#warning This is wrong.
-#endif
+               // FIXME: This is wrong.
                int minfill = max_width;
                for ( ; rit != end; ++rit)
                        if (rit->fill() < minfill)
index 7b1206a96c040009eeedf117ced332f8ff8ae174..ba0b09fe92822fc395465c483287b485cfada132 100644 (file)
@@ -150,9 +150,7 @@ Font Text::getFont(Buffer const & buffer, Paragraph const & par,
        BOOST_ASSERT(pos >= 0);
 
        Layout_ptr const & layout = par.layout();
-#ifdef WITH_WARNINGS
-#warning broken?
-#endif
+       // FIXME: broken?
        BufferParams const & params = buffer.params();
        pos_type const body_pos = par.beginOfBody();
 
@@ -1147,12 +1145,10 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
                    && oldpar.isLineSeparator(old.pos() - 1)
                    && !oldpar.isDeleted(old.pos() - 1)) {
                        oldpar.eraseChar(old.pos() - 1, cur.buffer().params().trackChanges);
-#ifdef WITH_WARNINGS
-#warning This will not work anymore when we have multiple views of the same buffer
+// FIXME: This will not work anymore when we have multiple views of the same buffer
 // In this case, we will have to correct also the cursors held by
 // other bufferviews. It will probably be easier to do that in a more
 // automated way in CursorSlice code. (JMarc 26/09/2001)
-#endif
                        // correct all cursor parts
                        if (same_par) {
                                fixCursorAfterDelete(cur.top(), old.top());
@@ -1182,7 +1178,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
                ParagraphList & plist = old.text()->paragraphs();
                plist.erase(boost::next(plist.begin(), old.pit()));
 
-               // see #warning above
+               // see #warning (FIXME?) above 
                if (cur.depth() >= old.depth()) {
                        CursorSlice & curslice = cur[old.depth() - 1];
                        if (&curslice.inset() == &old.inset()
index 3c3b937993b4f5353c46e5a5187ea824cf8bbe67..7231f07cfad293cd97d3f27120c4aea254c7bdfb 100644 (file)
@@ -396,10 +396,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                Paragraph & par = cur.paragraph();
                bool start = !par.params().startOfAppendix();
 
-#ifdef WITH_WARNINGS
-#warning The code below only makes sense at top level.
+// FIXME: The code below only makes sense at top level.
 // Should LFUN_APPENDIX be restricted to top-level paragraphs?
-#endif
                // ensure that we have only one start_of_appendix in this document
                // FIXME: this don't work for multipart document!
                for (pit_type tmp = 0, end = pars_.size(); tmp != end; ++tmp) {
@@ -655,9 +653,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_DELETE_BACKWARD_SKIP:
                // Reverse the effect of LFUN_BREAK_PARAGRAPH_SKIP.
                if (!cur.selection()) {
-#ifdef WITH_WARNINGS
-#warning look here
-#endif
+                       // FIXME: look here
                        //CursorSlice cur = cursor();
                        backspace(cur);
                        //anchor() = cur;
index b3cc6d97fe97a531b12f37ea997e7c74d71f08fb..3105a40c36c80e31f978edc11c3faafab6464515 100644 (file)
@@ -244,7 +244,7 @@ int Trans::load(Lexer & lex)
                                return -1;
 
 #if 1
-//#warning This code should be removed...
+                       // FIXME: This code should be removed...
                        // But we need to fix up all the kmap files first
                        // so that this field is not present anymore.
                        if (lex.next(true)) {
index a30aba41ddd74ea9d7165fd2d592b2df3bbba288..fc6468056b086badb5887e428681ba8ae699e7c7 100644 (file)
@@ -538,9 +538,7 @@ Inset * readInset(Lexer & lex, Buffer const & buf)
 
                inset->read(buf, lex);
 
-#ifdef WITH_WARNINGS
-#warning hack..
-#endif
+// FIXME: hack..
                if (inset->lyxCode() == Inset::MATHMACRO_CODE) {
                        MathMacroTemplate const * tmpl =
                                static_cast<MathMacroTemplate*>(inset.get());
index b7b446b1cb580d4085b5fed4a57ec4371c0a720e..744bc4bc51d797973f7e776657ffa3f18f3b6f9f 100644 (file)
@@ -666,9 +666,7 @@ void PrefDisplay::apply(LyXRC & rc) const
        }
        rc.display_graphics = dtype;
 
-#ifdef WITH_WARNINGS
-#warning FIXME!! The graphics cache no longer has a changeDisplay method.
-#endif
+       // FIXME!! The graphics cache no longer has a changeDisplay method.
 #if 0
        if (old_value != rc.display_graphics) {
                lyx::graphics::GCache & gc = lyx::graphics::GCache::get();
index f2fff95e03e855ebf54ed186fe2f88ea0835b4d3..dca6f212f922c57caee0760ecfecf66ccfd75b79 100644 (file)
@@ -131,9 +131,7 @@ void QWrap::apply()
 static string const numtostr(double val)
 {
        string a = convert<string>(val);
-#ifdef WITH_WARNINGS
-#warning Will this test ever trigger? (Lgb)
-#endif
+       // FIXME: Will this test ever trigger? (Lgb)
        if (a == "0")
                a.erase();
        return a;
index b7d97400b8a52ce0e0db95a5c00c41bff9297101..6478228bd5022d91cec49e0a11e6f4460506c1cb 100644 (file)
@@ -284,9 +284,7 @@ graphics::Params InsetGraphicsParams::as_grfxParams() const
                string const tmp = readBB_from_PSFile(filename);
                LYXERR(Debug::GRAPHICS) << "BB_from_File: " << tmp << std::endl;
                if (!tmp.empty()) {
-#ifdef WITH_WARNINGS
-# warning why not convert to unsigned int? (Lgb)
-#endif
+                       // FIXME: why not convert to unsigned int? (Lgb)
                        unsigned int const bb_orig_xl = convert<int>(token(tmp, ' ', 0));
                        unsigned int const bb_orig_yb = convert<int>(token(tmp, ' ', 1));
 
index 90f776e2152e7dfd3392c7d1e06873b0b1937582..16f46f7bb7235d499e20a1e6737e009984e512a6 100644 (file)
@@ -506,13 +506,11 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
 
                tmp->markDepClean(m_buffer->temppath());
 
-#ifdef WITH_WARNINGS
-#warning handle non existing files
-#warning Second argument is irrelevant!
+// FIXME: handle non existing files
+// FIXME: Second argument is irrelevant!
 // since only_body is true, makeLaTeXFile will not look at second
 // argument. Should we set it to string(), or should makeLaTeXFile
 // make use of it somehow? (JMarc 20031002)
-#endif
                // The included file might be written in a different encoding
                Encoding const * const oldEnc = runparams.encoding;
                runparams.encoding = &tmp->params().encoding();
index e89f59af843ef40f48fab794ae1acc1a27ee18ed..b352e9566d182ec4377e40d61f8b6671c58c6a60 100644 (file)
@@ -3797,9 +3797,7 @@ int InsetTabular::docbook(Buffer const & buf, odocstream & os,
        int ret = 0;
        Inset * master = 0;
 
-#ifdef WITH_WARNINGS
-#warning Why not pass a proper DocIterator here?
-#endif
+       // FIXME: Why not pass a proper DocIterator here?
 #if 0
        // if the table is inside a float it doesn't need the informaltable
        // wrapper. Search for it.
@@ -4290,9 +4288,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
 
        case Tabular::MULTICOLUMN: {
                if (sel_row_start != sel_row_end) {
-#ifdef WITH_WARNINGS
-#warning Need I say it ? This is horrible.
-#endif
+                       // FIXME: Need I say it ? This is horrible.
                        // FIXME UNICODE
                        Alert::error(_("Error setting multicolumn"),
                                     _("You cannot set multicolumn vertically."));
index 8e663a4310d3e1782bdd9000e8593b89ae8436f1..7927d2ce3deddeceeb9570ced33a6ac10bf0088f 100644 (file)
@@ -60,9 +60,7 @@ void Inset.heorem::write(Buffer const * buf, ostream & os) const
 
 auto_ptr<Inset> Inset.heorem::doClone() const
 {
-#ifdef WITH_WARNINGS
-#warning Is this inset used? If YES this is WRONG!!! (Jug)
-#endif
+       // FIXME: Is this inset used? If YES this is WRONG!!! (Jug)
        auto_ptr<Inset.heorem> result(new InsetTheorem);
        result->setCollapsed(!isOpen());
 
index 6e5b65a7ec217b157a1748b877a8a5439483ad08..c0148fcac2bce8fb5c0310800444a611328cc05b 100644 (file)
@@ -156,9 +156,7 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
        pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg);
        pi.pain.rectangle(x, a, w, h, Color::mathframe);
 
-#ifdef WITH_WARNINGS
-#warning FIXME
-#endif
+       // FIXME
 #if 0
        Cursor & cur = p.base.bv->cursor();
        if (cur.isInside(this))
index fe22ce78254906992edc1c334eb9981a92e58467..855b4902e97d02f69b1faeb828beec585f245da0 100644 (file)
@@ -57,21 +57,16 @@ void InsetMath::dump() const
 
 void InsetMath::metricsT(TextMetricsInfo const &, Dimension &) const
 {
-#ifdef WITH_WARNINGS
        lyxerr << "InsetMath::metricsT(Text) called directly!" << endl;
-#endif
 }
 
 
 void InsetMath::drawT(TextPainter &, int, int) const
 {
-#ifdef WITH_WARNINGS
        lyxerr << "InsetMath::drawT(Text) called directly!" << endl;
-#endif
 }
 
 
-
 void InsetMath::write(WriteStream & os) const
 {
        docstring const s = name();
index 17e83d5e7b2f12ed852685762d3b009d2c8ca445..38d6c7a305f415e3ab8b29083314d54ce54d18a6 100644 (file)
@@ -972,8 +972,7 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
                extra = from_ascii("noextra");
        std::string const lang = to_ascii(dlang);
 
-#ifdef WITH_WARNINGS
-#warning temporarily disabled
+       // FIXME: temporarily disabled
        //if (cur.selection()) {
        //      MathData ar;
        //      selGet(cur.ar);
@@ -981,7 +980,6 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
        //      insert(pipeThroughExtern(lang, extra, ar));
        //      return;
        //}
-#endif
 
        MathData eq;
        eq.push_back(MathAtom(new InsetMathChar('=')));
@@ -1028,9 +1026,7 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
                cur.pos() = 0;
                MathData ar = cur.cell();
                lyxerr << "use cell: " << ar << endl;
-#ifdef WITH_WARNINGS
-#warning temporarily disabled
-#endif
+               // FIXME: temporarily disabled
                addRow(cur.row());
                ++cur.idx();
                ++cur.idx();
@@ -1386,9 +1382,7 @@ Inset::Code InsetMathHull::lyxCode() const
 bool InsetMathHull::searchForward(BufferView * bv, string const & str,
                                     bool, bool)
 {
-#ifdef WITH_WARNINGS
-#warning completely broken
-#endif
+       // FIXME: completely broken
        static InsetMathHull * lastformula = 0;
        static CursorBase current = DocIterator(ibegin(nucleus()));
        static MathData ar;
index 078989809ec275b4ca8e2282b00a7687fadb8c78..5955bd66e2b10e2a7dc5e1d615410421d1913cd4 100644 (file)
@@ -369,9 +369,7 @@ bool InsetMathNest::setMouseHover(bool mouse_hover)
 
 bool InsetMathNest::notifyCursorLeaves(Cursor & /*cur*/)
 {
-#ifdef WITH_WARNINGS
-#warning look here
-#endif
+       // FIXME: look here
 #if 0
        MathData & ar = cur.cell();
        // remove base-only "scripts"
index a911cc839aec0a2da88fa620828ce2278e240140..67be300ef987497120307f210b9cd5030ca98648 100644 (file)
@@ -160,11 +160,9 @@ void MathData::replace(ReplaceData & rep)
                }
        }
 
-#ifdef WITH_WARNINGS
-#warning temporarily disabled
+       // FIXME: temporarily disabled
        // for (const_iterator it = begin(); it != end(); ++it)
        //      it->nucleus()->replace(rep);
-#endif
 }
 
 
index e6e439163bf92d7aef97763e76ef97fb95bdb26c..e0fc3d63c6970448076c1bb3e6a0135daa3c13a4 100644 (file)
@@ -159,9 +159,7 @@ void MathMacroTemplate::draw(PainterInfo & p, int x, int y) const
        //pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg);
        pi.pain.rectangle(x, a, w, h, Color::mathframe);
 
-#ifdef WITH_WARNINGS
-#warning FIXME
-#endif
+       // FIXME:
 #if 0
        Cursor & cur = p.base.bv->cursor();
        if (cur.isInside(this))
index 255dbadc9e4e2bc345a0011c73559a788baf3da1..3063d7a2008b26c7d2e6aed742a60880c0e40f95 100644 (file)
@@ -1254,9 +1254,7 @@ void Parser::parse1(InsetMathGrid & grid, unsigned flags,
                }
 
                else if (t.cs() == "kern") {
-#ifdef WITH_WARNINGS
-#warning A hack...
-#endif
+                       // FIXME: A hack...
                        docstring s;
                        while (true) {
                                Token const & t = getToken();
index 15b674ccdcce7d1a9da52ceaa644c973aa0a0ed6..051687095499f0616cd82cf7abcf4be1c751f774 100644 (file)
@@ -38,9 +38,7 @@ bool lyx::support::chmod(FileName const & file, unsigned long int mode)
        if (::chmod(file.toFilesystemEncoding().c_str(), mode_t(mode)) != 0)
                return false;
 #else
-# ifdef WITH_WARNINGS
-#  warning "File permissions are ignored on this system."
-# endif
+       // FIXME: "File permissions are ignored on this system."
 #endif
        return true;
 }
index 6e255d277e784967b2cf631d852e1c66a776bb80..fe5d73b34a4ab31a4863befab8174d99814db492 100644 (file)
@@ -1178,9 +1178,7 @@ void readBB_lyxerrMessage(FileName const & file, bool & zipped,
 {
        LYXERR(Debug::GRAPHICS) << "[readBB_from_PSFile] "
                << message << std::endl;
-#ifdef WITH_WARNINGS
-#warning Why is this func deleting a file? (Lgb)
-#endif
+       // FIXME: Why is this func deleting a file? (Lgb)
        if (zipped)
                unlink(file);
 }
index a7dae33d2ac914361be0ed4635b65494e05d5826..410c05722b6e7d3ffe0c8752749760d493311140 100644 (file)
@@ -41,9 +41,7 @@ int mkdir(FileName const & pathname, unsigned long int mode)
 # if MKDIR_TAKES_ONE_ARG
        // MinGW32
        return ::mkdir(pathname.toFilesystemEncoding().c_str());
-#  ifdef WITH_WARNINGS
-#   warning "Permissions of created directories are ignored on this system."
-#  endif
+       // FIXME: "Permissions of created directories are ignored on this system."
 # else
        // POSIX
        return ::mkdir(pathname.toFilesystemEncoding().c_str(), mode_t(mode));
@@ -51,14 +49,10 @@ int mkdir(FileName const & pathname, unsigned long int mode)
 #elif defined(_WIN32)
        // plain Windows 32
        return CreateDirectory(pathname.toFilesystemEncoding().c_str(), 0) != 0 ? 0 : -1;
-# ifdef WITH_WARNINGS
-#  warning "Permissions of created directories are ignored on this system."
-# endif
+       // FIXME: "Permissions of created directories are ignored on this system."
 #elif HAVE__MKDIR
        return ::_mkdir(pathname.toFilesystemEncoding().c_str());
-# ifdef WITH_WARNINGS
-#  warning "Permissions of created directories are ignored on this system."
-# endif
+       // FIXME: "Permissions of created directories are ignored on this system."
 #else
 #   error "Don't know how to create a directory on this system."
 #endif