[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: KDE/kdevplatform
From: Alexander Dymo <dymo () ukrpost ! ua>
Date: 2008-09-10 18:49:15
Message-ID: 200809102149.16218.dymo () ukrpost ! ua
[Download RAW message or body]
> Assuming you have a KTextEditor::Document around, the right way to do it
> would be:
> KTextEditor::VariableInterface* iface =
> qobject_cast<KTextEditor::VariableInterface*>(doc);
>
> if (iface) {
> QString indentWidth = iface->variable("indent-width");
> ...
> }
> In other words, you can query the documents for arbitrary variables. You
> don't have to parse it yourself, it's for free.
If the document is opened in KDevelop, one can do
IDocument *doc = ICore::self()->documentController()->documentForUrl(url);
KTextEditor::Document *textdoc = doc->textDocument();
but I'd assume source formatter plugin also needs to reformat the files which
aren't opened (like all files in the project)?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic