Commit 1816b93
committed
Qt: prune dead getters, signals, forward decls, and locals
Pure dead-code removal in three files. No behaviour change.
* ui_qt.h: drop 8 redundant forward declarations.
GridView, ShaderParamsDialog, CoreOptionsDialog, CoreInfoDialog,
PlaylistEntryDialog and ViewOptionsDialog all have full
definitions in ui_qt_widgets.h, which ui_qt.h includes at line
46 - the forward decls below the include were noise.
MainWindow and ThumbnailWidget were forward-declared at the top
of ui_qt.h but never referenced before their own definitions
later in the same file. Only the ThumbnailLabel forward decl is
load-bearing - ThumbnailWidget references ThumbnailLabel* as a
member before ThumbnailLabel is defined.
* MainWindow: drop 5 dead signals and 4 dead connect() calls.
- gotReloadCoreOptions, gotThumbnailDownload, updateThumbnails
and extractArchiveDeferred each had a connect() in the
constructor but were never emitted anywhere - the signal
connections were inert. The slots they pointed to
(onDownloadThumbnail, onGotReloadCoreOptions, onExtractArchive,
updateVisibleItems) all stay - they have other callers, either
via direct calls or via QMetaObject::invokeMethod.
- gridItemChanged was declared but neither emitted nor connected.
* MainWindow: drop 3 dead public getters.
contentTableView(), contentGridView() and searchWidget() were
declared and defined but had zero callers across ui/, libretro-
common/, frontend/, menu/, and retroarch.c.
* MainWindow::MainWindow: drop dead 'QDir playlistDir' and the
path_dir_playlist local that only existed to construct it.
Both unused since the constructor split.
-Wunused-variable did not flag the QDir because of its
non-trivial constructor.
* MainWindow::changeThumbnail: replace QDir.exists() / QDir.mkpath
pair with path_is_directory() / path_mkdir() from libretro-
common, dropping one more QDir local. mkpath(".") and
path_mkdir() both create parent directories recursively.
* MainWindow::setCoreActions: drop dead 'QFileInfo info' block
('info' was assigned via setFile() but never read) and a dead
'coreName = "<n/a>"' assignment in a then-branch that did
nothing else with coreName.
* qt_companion_select_initial_playlist: drop redundant
'listWidget->count() &&' guard from two for-loop conditions
('i < count' is already false when count is 0).
* ui_qt_widgets.cpp: drop pre-existing dead 'uint32_t flags =
runloop_st->flags' local in CoreOptionsDialog (-Wunused-variable
was suppressed in the build and so this slipped in years ago).1 parent a9878b1 commit 1816b93
3 files changed
Lines changed: 25 additions & 66 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1945 | 1945 | | |
1946 | 1946 | | |
1947 | 1947 | | |
1948 | | - | |
1949 | | - | |
1950 | 1948 | | |
1951 | 1949 | | |
1952 | 1950 | | |
1953 | | - | |
1954 | 1951 | | |
1955 | 1952 | | |
1956 | 1953 | | |
| |||
1991 | 1988 | | |
1992 | 1989 | | |
1993 | 1990 | | |
1994 | | - | |
1995 | | - | |
1996 | 1991 | | |
1997 | 1992 | | |
1998 | 1993 | | |
1999 | 1994 | | |
2000 | 1995 | | |
2001 | 1996 | | |
2002 | | - | |
2003 | | - | |
2004 | | - | |
2005 | | - | |
2006 | 1997 | | |
2007 | 1998 | | |
2008 | 1999 | | |
| |||
2585 | 2576 | | |
2586 | 2577 | | |
2587 | 2578 | | |
2588 | | - | |
2589 | 2579 | | |
2590 | 2580 | | |
2591 | | - | |
| 2581 | + | |
2592 | 2582 | | |
2593 | | - | |
| 2583 | + | |
2594 | 2584 | | |
2595 | 2585 | | |
2596 | 2586 | | |
| |||
3115 | 3105 | | |
3116 | 3106 | | |
3117 | 3107 | | |
3118 | | - | |
3119 | | - | |
3120 | | - | |
| 3108 | + | |
3121 | 3109 | | |
3122 | | - | |
3123 | | - | |
3124 | | - | |
| 3110 | + | |
3125 | 3111 | | |
3126 | | - | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
3127 | 3116 | | |
3128 | | - | |
3129 | | - | |
| 3117 | + | |
| 3118 | + | |
3130 | 3119 | | |
3131 | | - | |
| 3120 | + | |
| 3121 | + | |
3132 | 3122 | | |
3133 | | - | |
3134 | | - | |
3135 | | - | |
3136 | | - | |
3137 | | - | |
3138 | | - | |
3139 | | - | |
3140 | | - | |
3141 | | - | |
| 3123 | + | |
| 3124 | + | |
3142 | 3125 | | |
| 3126 | + | |
3143 | 3127 | | |
3144 | | - | |
3145 | | - | |
3146 | | - | |
3147 | | - | |
3148 | | - | |
3149 | | - | |
3150 | | - | |
3151 | | - | |
3152 | | - | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
3153 | 3136 | | |
3154 | 3137 | | |
3155 | 3138 | | |
| |||
3193 | 3176 | | |
3194 | 3177 | | |
3195 | 3178 | | |
3196 | | - | |
3197 | 3179 | | |
3198 | 3180 | | |
3199 | 3181 | | |
3200 | 3182 | | |
3201 | | - | |
3202 | | - | |
3203 | 3183 | | |
3204 | 3184 | | |
3205 | 3185 | | |
| |||
3467 | 3447 | | |
3468 | 3448 | | |
3469 | 3449 | | |
3470 | | - | |
3471 | 3450 | | |
3472 | 3451 | | |
3473 | 3452 | | |
| |||
3723 | 3702 | | |
3724 | 3703 | | |
3725 | 3704 | | |
3726 | | - | |
3727 | 3705 | | |
3728 | 3706 | | |
3729 | 3707 | | |
3730 | 3708 | | |
3731 | | - | |
3732 | 3709 | | |
3733 | 3710 | | |
3734 | 3711 | | |
| |||
5041 | 5018 | | |
5042 | 5019 | | |
5043 | 5020 | | |
5044 | | - | |
| 5021 | + | |
5045 | 5022 | | |
5046 | 5023 | | |
5047 | 5024 | | |
| |||
5064 | 5041 | | |
5065 | 5042 | | |
5066 | 5043 | | |
5067 | | - | |
| 5044 | + | |
5068 | 5045 | | |
5069 | 5046 | | |
5070 | 5047 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | 99 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 100 | | |
109 | 101 | | |
110 | 102 | | |
| |||
471 | 463 | | |
472 | 464 | | |
473 | 465 | | |
474 | | - | |
475 | 466 | | |
476 | 467 | | |
477 | | - | |
478 | 468 | | |
479 | | - | |
480 | 469 | | |
481 | 470 | | |
482 | 471 | | |
| |||
524 | 513 | | |
525 | 514 | | |
526 | 515 | | |
527 | | - | |
528 | 516 | | |
529 | 517 | | |
530 | | - | |
531 | 518 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | 519 | | |
536 | 520 | | |
537 | 521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2922 | 2922 | | |
2923 | 2923 | | |
2924 | 2924 | | |
2925 | | - | |
2926 | | - | |
2927 | 2925 | | |
2928 | 2926 | | |
2929 | 2927 | | |
| |||
0 commit comments