~ubuntu-branches/ubuntu/karmic/qtcreator/karmic-security

« back to all changes in this revision

Viewing changes to src/plugins/texteditor/texteditorplugin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-07-19 16:23:52 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090719162352-oni0h8hrrkdd3sil
Tags: 1.2.1-1ubuntu1
* Merge from debian unstable (LP: #399414), remaining changes:
  - Add qt-creator transitional package.
* debian/control: Conflicts on qt-creator (<< 1.2.1-1ubuntu1).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
**
5
5
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
6
6
**
7
 
** Contact:  Qt Software Information (qt-info@nokia.com)
 
7
** Contact: Nokia Corporation (qt-info@nokia.com)
8
8
**
9
9
** Commercial Usage
10
10
**
23
23
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24
24
**
25
25
** If you are unsure which license is appropriate for your use, please
26
 
** contact the sales department at qt-sales@nokia.com.
 
26
** contact the sales department at http://www.qtsoftware.com/contact.
27
27
**
28
28
**************************************************************************/
29
29
 
30
30
#include "texteditorplugin.h"
31
31
 
32
32
#include "findinfiles.h"
 
33
#include "findincurrentfile.h"
33
34
#include "fontsettings.h"
34
35
#include "linenumberfilter.h"
35
36
#include "texteditorconstants.h"
90
91
        return false;
91
92
 
92
93
    Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
93
 
    wizardParameters.setDescription(tr("This creates a new text file (.txt)"));
 
94
    wizardParameters.setDescription(tr("Creates a text file (.txt)."));
94
95
    wizardParameters.setName(tr("Text File"));
95
96
    wizardParameters.setCategory(QLatin1String("General"));
96
97
    wizardParameters.setTrCategory(tr("General"));
123
124
    // Make sure the shortcut still works when the completion widget is active
124
125
    completionShortcut->setContext(Qt::ApplicationShortcut);
125
126
    Core::Command *command = am->registerShortcut(completionShortcut, Constants::COMPLETE_THIS, context);
126
 
#ifndef Q_OS_MAC
 
127
#ifndef Q_WS_MAC
127
128
    command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Space")));
128
129
#else
129
130
    command->setDefaultKeySequence(QKeySequence(tr("Meta+Space")));
130
131
#endif
131
132
    connect(completionShortcut, SIGNAL(activated()), this, SLOT(invokeCompletion()));
132
133
 
133
 
    addAutoReleasedObject(new FindInFiles(
134
 
        ExtensionSystem::PluginManager::instance()->getObject<Find::SearchResultWindow>()));
135
134
 
136
135
    return true;
137
136
}
146
145
            this, SLOT(updateSearchResultsFont(TextEditor::FontSettings)));
147
146
 
148
147
    updateSearchResultsFont(m_settings->fontSettings());
 
148
 
 
149
    addAutoReleasedObject(new FindInFiles(
 
150
        ExtensionSystem::PluginManager::instance()->getObject<Find::SearchResultWindow>()));
 
151
    addAutoReleasedObject(new FindInCurrentFile(
 
152
        ExtensionSystem::PluginManager::instance()->getObject<Find::SearchResultWindow>()));
149
153
}
150
154
 
151
155
void TextEditorPlugin::initializeEditor(PlainTextEditor *editor)