This file is indexed.

/usr/include/qxrunner/runnerwindow.h is in libqxrunner-dev 0.9.2-0ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
/*!
 * \file  runnerwindow.h
 *
 * \brief Declares class RunnerWindow.
 */

#ifndef RUNNERWINDOW_H
#define RUNNERWINDOW_H

#include "ui_runnerwindow.h"

#include <QSemaphore>
#include <QLabel>

namespace Ui {
	class StatusWidget;
}

namespace QxRunner {

class AppSettings;
class StatusWidget;
class RunnerModel;
class RunnerProxyModel;
class ResultsModel;
class ResultsProxyModel;
class RunnerViewController;
class ResultsViewController;

/*!
 * \brief The RunnerWindow class defines the QxRunner main window.
 *
 * The RunnerWindow class presents a RunnerModel and its ResultsModel
 * in appropriate views to the user and provides commands for their
 * manipulation. Runner items can be executed. Their results can be
 * filtered and sorted.
 *
 * The current implementation doesn't expect that a previously set
 * model gets replaced by another one. Nevertheless the code tries
 * to catch up such a situation by smoothly removing a previous model.
 * But problems could arise for example when there are still items
*  executed in the thread of the model to be replaced.
 *
 * In minimal update mode only a subset of the item result data is
 * displayed during item execution. When all items have finished
 * all result data is shown at once.
 *
 * GUI internal synchronization is employed to prevent from user
 * interactions interfere with the ongoing item execution.
 *
 * \sa \ref main_window
 */

class RunnerWindow : public QMainWindow
{
    Q_OBJECT

friend class AppSettings;

public: // Operations

	/*!
	 * Constructs a runner window with the given \a parent and the
	 * specified widget \a flags.
	 */
	RunnerWindow(QWidget* parent = 0, Qt::WFlags flags = 0);

	/*!
	 * Destroys this runner window.
	 *
	 * \note
	 * Deleting the model provided for the main window is left to
	 * the owner of the model instance.
	 */
	~RunnerWindow();

	/*!
	 * Shows the main window adapted to the current model and settings.
	 */
	void show();

	/*!
	 * Sets the \a model for the main window to present. 
	 */
	void setModel(RunnerModel* model);

	/*!
	 * Returns the view which presents runner items.
	 */
	QTreeView* runnerView() const;

	/*!
	 * Returns the view which presents result items.
	 */
	QTreeView* resultsView() const;

	/*!
	 * Returns the runner model that contains the data that is
	 * available through the runner proxy model.
	 */
	RunnerModel* runnerModel() const;

	/*!
	 * Returns the proxy model that the runner view is presenting.
	 */
	RunnerProxyModel* runnerProxyModel() const;

	/*!
	 * Returns the results model that contains the data that is
	 * available through the results proxy model.
	 */
	ResultsModel* resultsModel() const;

	/*!
	 * Returns the proxy model that the results view is presenting.
	 */
	ResultsProxyModel* resultsProxyModel() const;

	/*!
	 * Returns true if the results view is visible, otherwise false.
	 */
	bool isResultsViewVisible() const;

private slots:

	/*!
	 * Displays the execution progress for \a numItems items.
	 */
	void displayProgress(int numItems) const;

	/*!
	 * Updates the GUI when all items have completed.
	 */
	void displayCompleted() const;

	/*!
	 * Displays the total number \a numItems of items.
	 */
	void displayNumTotal(int numItems) const;

	/*!
	 * Displays the number \a numItems of selected items.
	 */
	void displayNumSelected(int numItems) const;

	/*!
	 * Displays the number \a numItems of completed items.
	 */
	void displayNumCompleted(int numItems) const;

	/*!
	 * Displays the number \a numItems of items that completed
	 * successfully.
	 */
	void displayNumSuccess(int numItems) const;

	/*!
	 * Displays the number \a numItems of items that returned an
	 * info result.
	 */
	void displayNumInfos(int numItems) const;

	/*!
	 * Displays the number \a numItems of items that returned a
	 * warning result.
	 */
	void displayNumWarnings(int numItems) const;

	/*!
	 * Displays the number \a numItems of items that returned an
	 * error result.
	 */
	void displayNumErrors(int numItems) const;

	/*!
	 * Displays the number \a numItems of items that returned a
	 * fatal result.
	 */
	void displayNumFatals(int numItems) const;

	/*!
	 * Displays the number \a numItems of items that produced an
	 * unhandled error.
	 */
	void displayNumExceptions(int numItems) const;

	/*!
	 * Highlights the runner view row where the data of the runner
	 * item referred to by \a runnerItemIndex is displayed.
	 */
	void highlightRunningItem(const QModelIndex& runnerItemIndex) const;

	/*!
	 * Sets the filter in the results model. The filter is determinded
	 * from the enabled filter buttons.
	 */
	void setResultsFilter() const;

	/*!
	 * Highlights the results view row that corresponds to the runner
	 * proxy model selection in \a selected. \a deselected is ignored.
	 */
	void syncResultWithRunnerItem(const QItemSelection& selected,
                                  const QItemSelection& deselected) const;

	/*!
	 * Highlights the runner view row that corresponds to the results
	 * proxy model selection in \a selected. \a deselected is ignored.
	 */
	void syncRunnerItemWithResult(const QItemSelection& selected,
                                  const QItemSelection& deselected) const;

	/*!
	 * Ensures that the view which has the focus shows a focus rect
	 * in the row referred to by \a index.
	 */
	void ensureFocusRect(const QModelIndex& index);

	/*!
	 * Ensures that the highlighted row in every view is visible.
	 */
	void scrollToHighlightedRows() const;

	/*!
	 * Exectues the items in the model.
	 */
	void runItems();

	/*!
	 * Stops item execution. If first stopping attempt isn't successfull
	 * the StoppingDialog is shown.
	 */
	void stopItems();

	/*!
	 * Helper method needed to sync the results display with the results
	 * dock widget visibility. Ensures highlighted rows are visible.
	 */
	void showResults(bool show);

	/*!
	 * Shows the columns selection dialog.
	 */
	void showColumnsSelection();

	/*!
	 * Shows the settings dialog.
	 */
	void showSettings();

	/*!
	 * Shows the about dialog.
	 */
	void showAbout();

private: // Operations

	/*!
	 * Disables and modifies widgets and signals before running items.
	 */
	void disableControlsBeforeRunning();

	/*!
	 * Enables and modifies widgets and signals after item execution
	 * has finished.
	 */
	void enableControlsAfterRunning() const;

	/*!
	 * If \a enable is true the actions for item manipulation are
	 * enabled, otherwise disabled.
	 */
	void enableItemActions(bool enable) const;

	/*!
	 * If \a enable is true the filter buttons are enabled, otherwise
	 * disabled.
	 */
	void enableResultsFilter(bool enable) const;

	/*!
	 * If \a enable is true syncResultWithRunnerItem() is enabled,
	 * otherwise disabled.
	 */
	void enableRunnerItemSync(bool enable) const;

	/*!
	 * If \a enable is true syncRunnerItemWithResult() is enabled,
	 * otherwise disabled.
	 */
	void enableResultSync(bool enable) const;

	/*!
	 * Sets a suitable current index in the results view so the view
	 * has a focus rect and behaves 'normal' when it gets the focus.
	 */
	void ensureCurrentResult() const;

	/*!
	 * Disables or removes menu items adapted to the model.
	 */
	void adjustMenus() const;

	/*!
	 * Sets \a numItems as text in \a labelForText. If \a numItems
	 * is 0 the labels are hidden, otherwise made visible.
	 */
	void displayStatusNum(QLabel* labelForText,
                          QLabel* labelForPic, int numItems) const;

	/*!
	 * Returns true if the GUI and model are in minimal update mode,
	 * otherwise false.
	 */
	bool isMinimalUpdate() const;

	/*!
	 * Returns the status widget.
	 */
	Ui::StatusWidget* statusWidget() const;

	/*!
	 * Returns the runner view controller.
	 */
	RunnerViewController* runnerController() const;

	/*!
	 * Returns the results view controller.
	 */
	ResultsViewController* resultsController() const;

	/*!
	 * Writes settings to the INI file and ends the program. If items are
	 * running the user can choose to terminate 'the hard way'.
	 */
	void closeEvent(QCloseEvent* event);

	// Copy and assignment not supported.
	RunnerWindow(const RunnerWindow&);
	RunnerWindow& operator=(const RunnerWindow&);

private: // Attributes

	Ui::RunnerWindow ui;

	StatusWidget* m_statusWidget;

	QSemaphore m_sema;

	QBrush m_highlightBrush;

	RunnerViewController*  m_runnerViewController;
	ResultsViewController* m_resultsViewController;
};

} // namespace

#endif // RUNNERWINDOW_H