Changeset View
Changeset View
Standalone View
Standalone View
krusader/GUI/kcmdline.cpp
Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Line(s) | 159 | { | |||
---|---|---|---|---|---|
173 | cmdLine->setMaximumHeight(height); | 173 | cmdLine->setMaximumHeight(height); | ||
174 | cmdLine->setCompletionObject(&completion); | 174 | cmdLine->setCompletionObject(&completion); | ||
175 | cmdLine->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); | 175 | cmdLine->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); | ||
176 | // load the history | 176 | // load the history | ||
177 | KConfigGroup grpSvr(krConfig, "Private"); | 177 | KConfigGroup grpSvr(krConfig, "Private"); | ||
178 | QStringList list = grpSvr.readEntry("cmdline history", QStringList()); | 178 | QStringList list = grpSvr.readEntry("cmdline history", QStringList()); | ||
179 | cmdLine->setHistoryItems(list); | 179 | cmdLine->setHistoryItems(list); | ||
180 | 180 | | |||
181 | connect(cmdLine, SIGNAL(returnPressed(QString)), this, SLOT(slotRun())); | 181 | connect(cmdLine, QOverload<const QString &>::of(&CmdLineCombo::returnPressed), this, &KCMDLine::slotRun); | ||
182 | connect(cmdLine, SIGNAL(returnPressed(QString)), cmdLine->lineEdit(), SLOT(clear())); | 182 | connect(cmdLine, QOverload<const QString &>::of(&CmdLineCombo::returnPressed), cmdLine->lineEdit(), &QLineEdit::clear); | ||
183 | connect(cmdLine, SIGNAL(returnToPanel()), this, SLOT(slotReturnFocus())); | 183 | connect(cmdLine, &CmdLineCombo::returnToPanel, this, &KCMDLine::slotReturnFocus); | ||
184 | 184 | | |||
185 | cmdLine->setWhatsThis(i18n("<qt><p>Well, it is actually quite simple: you type your command here and Krusader obeys.</p><p><b>Tip</b>: move within command line history with <Up> and <Down> arrows.</p></qt>")); | 185 | cmdLine->setWhatsThis(i18n("<qt><p>Well, it is actually quite simple: you type your command here and Krusader obeys.</p><p><b>Tip</b>: move within command line history with <Up> and <Down> arrows.</p></qt>")); | ||
186 | layout->addWidget(cmdLine, 0, 1); | 186 | layout->addWidget(cmdLine, 0, 1); | ||
187 | 187 | | |||
188 | buttonAddPlaceholder = new QToolButton(this); | 188 | buttonAddPlaceholder = new QToolButton(this); | ||
189 | buttonAddPlaceholder->setAutoRaise(true); | 189 | buttonAddPlaceholder->setAutoRaise(true); | ||
190 | buttonAddPlaceholder->setIcon(Icon("list-add")); | 190 | buttonAddPlaceholder->setIcon(Icon("list-add")); | ||
191 | connect(buttonAddPlaceholder, SIGNAL(clicked()), this, SLOT(addPlaceholder())); | 191 | connect(buttonAddPlaceholder, &QToolButton::clicked, this, &KCMDLine::addPlaceholder); | ||
192 | buttonAddPlaceholder->setWhatsThis(i18n("Add <b>Placeholders</b> for the selected files in the panel.")); | 192 | buttonAddPlaceholder->setWhatsThis(i18n("Add <b>Placeholders</b> for the selected files in the panel.")); | ||
193 | 193 | | |||
194 | layout->addWidget(buttonAddPlaceholder, 0, 2); | 194 | layout->addWidget(buttonAddPlaceholder, 0, 2); | ||
195 | 195 | | |||
196 | // a run in terminal button | 196 | // a run in terminal button | ||
197 | terminal = new KCMDModeButton(this); | 197 | terminal = new KCMDModeButton(this); | ||
198 | terminal->setAutoRaise(true); | 198 | terminal->setAutoRaise(true); | ||
199 | layout->addWidget(terminal, 0, 3); | 199 | layout->addWidget(terminal, 0, 3); | ||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |