Changeset View
Changeset View
Standalone View
Standalone View
krusader/krusader.cpp
Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Line(s) | 130 | case KConfigBase::ReadWrite : | |||
---|---|---|---|---|---|
132 | break; | 132 | break; | ||
133 | } | 133 | } | ||
134 | if (!message.isEmpty()) { | 134 | if (!message.isEmpty()) { | ||
135 | KMessageBox::error(krApp, message); | 135 | KMessageBox::error(krApp, message); | ||
136 | } | 136 | } | ||
137 | 137 | | |||
138 | // create MountMan | 138 | // create MountMan | ||
139 | KrGlobal::mountMan = new KMountMan(this); | 139 | KrGlobal::mountMan = new KMountMan(this); | ||
140 | connect(KrGlobal::mountMan, SIGNAL(refreshPanel(QUrl)), SLOTS, SLOT(refresh(QUrl))); | 140 | connect(KrGlobal::mountMan, &KMountMan::refreshPanel, SLOTS, &KRslots::refresh); | ||
141 | 141 | | |||
142 | // create popular URLs container | 142 | // create popular URLs container | ||
143 | _popularUrls = new PopularUrls(this); | 143 | _popularUrls = new PopularUrls(this); | ||
144 | 144 | | |||
145 | // create bookman | 145 | // create bookman | ||
146 | krBookMan = new KrBookmarkHandler(this); | 146 | krBookMan = new KrBookmarkHandler(this); | ||
147 | 147 | | |||
148 | // create job manager | 148 | // create job manager | ||
▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | |||||
266 | isStarting = false; | 266 | isStarting = false; | ||
267 | 267 | | |||
268 | //HACK - used by [ListerTextArea|KrSearchDialog|LocateDlg]:keyPressEvent() | 268 | //HACK - used by [ListerTextArea|KrSearchDialog|LocateDlg]:keyPressEvent() | ||
269 | KrGlobal::copyShortcut = _listPanelActions->actCopy->shortcut(); | 269 | KrGlobal::copyShortcut = _listPanelActions->actCopy->shortcut(); | ||
270 | 270 | | |||
271 | //HACK: make sure the active view becomes focused | 271 | //HACK: make sure the active view becomes focused | ||
272 | // for some reason sometimes the active view cannot be focused immediately at this point, | 272 | // for some reason sometimes the active view cannot be focused immediately at this point, | ||
273 | // so queue it for the main loop | 273 | // so queue it for the main loop | ||
274 | QTimer::singleShot(0, ACTIVE_PANEL->view->widget(), SLOT(setFocus())); | 274 | QTimer::singleShot(0, ACTIVE_PANEL->view->widget(), QOverload<>::of(&QWidget::setFocus)); | ||
275 | 275 | | |||
276 | _openUrlTimer.setSingleShot(true); | 276 | _openUrlTimer.setSingleShot(true); | ||
277 | connect(&_openUrlTimer, SIGNAL(timeout()), SLOT(doOpenUrl())); | 277 | connect(&_openUrlTimer, &QTimer::timeout, this, &Krusader::doOpenUrl); | ||
278 | 278 | | |||
279 | KStartupInfo *startupInfo = new KStartupInfo(0, this); | 279 | KStartupInfo *startupInfo = new KStartupInfo(0, this); | ||
280 | connect(startupInfo, &KStartupInfo::gotNewStartup, | 280 | connect(startupInfo, &KStartupInfo::gotNewStartup, | ||
281 | this, &Krusader::slotGotNewStartup); | 281 | this, &Krusader::slotGotNewStartup); | ||
282 | connect(startupInfo, &KStartupInfo::gotRemoveStartup, | 282 | connect(startupInfo, &KStartupInfo::gotRemoveStartup, | ||
283 | this, &Krusader::slotGotRemoveStartup); | 283 | this, &Krusader::slotGotRemoveStartup); | ||
284 | } | 284 | } | ||
285 | 285 | | |||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 348 | bool Krusader::event(QEvent *e) { | |||
351 | } | 351 | } | ||
352 | return KParts::MainWindow::event(e); | 352 | return KParts::MainWindow::event(e); | ||
353 | } | 353 | } | ||
354 | 354 | | |||
355 | // <patch> Moving from Pixmap actions to generic filenames - thanks to Carsten Pfeiffer | 355 | // <patch> Moving from Pixmap actions to generic filenames - thanks to Carsten Pfeiffer | ||
356 | void Krusader::setupActions() { | 356 | void Krusader::setupActions() { | ||
357 | QAction *bringToTopAct = new QAction(i18n("Bring Main Window to Top"), this); | 357 | QAction *bringToTopAct = new QAction(i18n("Bring Main Window to Top"), this); | ||
358 | actionCollection()->addAction("bring_main_window_to_top", bringToTopAct); | 358 | actionCollection()->addAction("bring_main_window_to_top", bringToTopAct); | ||
359 | connect(bringToTopAct, SIGNAL(triggered()), SLOT(moveToTop())); | 359 | connect(bringToTopAct, &QAction::triggered, this, &Krusader::moveToTop); | ||
360 | 360 | | |||
361 | KrActions::setupActions(this); | 361 | KrActions::setupActions(this); | ||
362 | _krActions = new KrActions(this); | 362 | _krActions = new KrActions(this); | ||
363 | _viewActions = new ViewActions(this, this); | 363 | _viewActions = new ViewActions(this, this); | ||
364 | _listPanelActions = new ListPanelActions(this, this); | 364 | _listPanelActions = new ListPanelActions(this, this); | ||
365 | _tabActions = new TabActions(this, this); | 365 | _tabActions = new TabActions(this, this); | ||
366 | } | 366 | } | ||
367 | 367 | | |||
▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines |