Buffer * Buffer::cloneFromMaster() const
{
BufferMap bufmap;
- cloned_buffers.push_back(new CloneList());
+ cloned_buffers.push_back(new CloneList);
CloneList * clones = cloned_buffers.back();
masterBuffer()->cloneWithChildren(bufmap, clones);
Buffer * Buffer::cloneBufferOnly() const {
- cloned_buffers.push_back(new CloneList());
+ cloned_buffers.push_back(new CloneList);
CloneList * clones = cloned_buffers.back();
Buffer * buffer_clone = new Buffer(fileName().absFileName(), false, this);
clones->insert(buffer_clone);
if (lyxrc.spellchecker == "native") {
#if defined(USE_MACOSX_PACKAGING)
if (!singleton_->pimpl_->apple_spell_checker_)
- singleton_->pimpl_->apple_spell_checker_ = new AppleSpellChecker();
+ singleton_->pimpl_->apple_spell_checker_ = new AppleSpellChecker;
singleton_->pimpl_->spell_checker_ = singleton_->pimpl_->apple_spell_checker_;
#else
singleton_->pimpl_->spell_checker_ = 0;
} else if (lyxrc.spellchecker == "aspell") {
#if defined(USE_ASPELL)
if (!singleton_->pimpl_->aspell_checker_)
- singleton_->pimpl_->aspell_checker_ = new AspellChecker();
+ singleton_->pimpl_->aspell_checker_ = new AspellChecker;
singleton_->pimpl_->spell_checker_ = singleton_->pimpl_->aspell_checker_;
#else
singleton_->pimpl_->spell_checker_ = 0;
} else if (lyxrc.spellchecker == "enchant") {
#if defined(USE_ENCHANT)
if (!singleton_->pimpl_->enchant_checker_)
- singleton_->pimpl_->enchant_checker_ = new EnchantChecker();
+ singleton_->pimpl_->enchant_checker_ = new EnchantChecker;
singleton_->pimpl_->spell_checker_ = singleton_->pimpl_->enchant_checker_;
#else
singleton_->pimpl_->spell_checker_ = 0;
} else if (lyxrc.spellchecker == "hunspell") {
#if defined(USE_HUNSPELL)
if (!singleton_->pimpl_->hunspell_checker_)
- singleton_->pimpl_->hunspell_checker_ = new HunspellChecker();
+ singleton_->pimpl_->hunspell_checker_ = new HunspellChecker;
singleton_->pimpl_->spell_checker_ = singleton_->pimpl_->hunspell_checker_;
#else
singleton_->pimpl_->spell_checker_ = 0;
if (it != theGlobalWordList.end())
return it->second;
else
- theGlobalWordList[lang] = new WordList();
+ theGlobalWordList[lang] = new WordList;
return theGlobalWordList[lang];
}
{
#ifdef Q_WS_WIN
/// WMF Mime handler for Windows clipboard.
- wmf_mime_ = new QWindowsMimeMetafile();
+ wmf_mime_ = new QWindowsMimeMetafile;
#endif
initKeySequences(&theTopLevelKeymap());
}
// Create the global default menubar which is shown for the dialogs
// and if no GuiView is visible.
// This must be done after the session was recovered to know the "last files".
- d->global_menubar_ = new GlobalMenuBar();
+ d->global_menubar_ = new GlobalMenuBar;
d->menus_.fillMenuBar(d->global_menubar_, 0, true);
#endif
qApp->clipboard()->mimeData(QClipboard::Clipboard);
if (!source) {
LYXERR0("0 bytes (no QMimeData)");
- return new QMimeData();
+ return new QMimeData;
}
// It appears that doing IO between getting a mimeData object
// and using it can cause a crash (maybe Qt used IO
: DockView(parent, "progress", qt_("Progress/Debug Messages"), area, flags)
{
eol_last_ = true;
- widget_ = new ProgressViewWidget();
+ widget_ = new ProgressViewWidget;
widget_->setMinimumHeight(150);
widget_->debugMessagesTW->setSizePolicy(QSizePolicy::Ignored,
QSizePolicy::Expanding);
// TODO cleanup, remove the singleton, handle multiple Windows?
progress_ = ProgressInterface::instance();
if (!dynamic_cast<GuiProgress*>(progress_)) {
- progress_ = new GuiProgress(); // TODO who deletes it
+ progress_ = new GuiProgress; // TODO who deletes it
ProgressInterface::setInstance(progress_);
}
QObject::connect(
Qt::DockWidgetArea area, Qt::WindowFlags flags)
: DockView(parent, "view-source", qt_("LaTeX Source"), area, flags)
{
- widget_ = new ViewSourceWidget();
+ widget_ = new ViewSourceWidget;
setWidget(widget_);
}
// Create the output layout, horizontal plus a VBox on the left with the search
// box and the tree
- QVBoxLayout * left_layout = new QVBoxLayout();
+ QVBoxLayout * left_layout = new QVBoxLayout;
left_layout->addWidget(search_, 0);
left_layout->addWidget(list_, 1);
// check onoff flag
// onoff parameter with value false
if (!par_validator)
- par_validator = new ParValidator();
+ par_validator = new ParValidator;
if (par_validator->onoff(key) && (value == "false" || value == "{false}"))
params_[keyname] = string();
// if the parameter is surrounded with {}, good
{
docstring msg;
if (!par_validator)
- par_validator = new ParValidator();
+ par_validator = new ParValidator;
for (map<string, string>::const_iterator it = params_.begin();
it != params_.end(); ++it) {
msg = par_validator->validate(it->first, it->second);