Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit 92e29ff

Browse files
authored
Merge pull request #179 from cipherboy/style-nits-v1-1
Style nits v1 1
2 parents 766d66a + 51ea733 commit 92e29ff

12 files changed

+34
-29
lines changed

include/MainWindow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class MainWindow : public QMainWindow
240240
/**
241241
* @brief We signal this to show the dialog
242242
*
243-
* This is to make sure we open the dialog in the event loop, not
243+
* This is to make sure we open the dialog in the event loop, not
244244
* before it even starts.
245245
*/
246246
void showOpenFileDialog();

include/RemediationRoleSaver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class RemediationSaverBase
4545
void removeFileWhenEmpty(const QString& filename);
4646

4747
QWidget* mParentWindow;
48-
DiagnosticsDialog * mDiagnostics;
48+
DiagnosticsDialog* mDiagnostics;
4949

5050
const QString mSaveMessage;
5151
const QString mFiletypeExtension;

include/RemoteMachineComboBox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RemoteMachineComboBox : public QWidget
6464
QSettings* mQSettings;
6565

6666
QStringList mRecentTargets;
67-
QComboBox *mRecentComboBox;
67+
QComboBox* mRecentComboBox;
6868
};
6969

7070
#endif

include/TailorProfileDialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TailorProfileDialog : public QDialog
3333
Q_OBJECT
3434

3535
public:
36-
TailorProfileDialog(const QString &startId, bool xccdf12, QWidget* parent = 0);
36+
TailorProfileDialog(const QString& startId, bool xccdf12, QWidget* parent = 0);
3737
virtual ~TailorProfileDialog();
3838

3939
QString getProfileID() const;

include/TailoringUndoCommands.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class ProfileTitleChangeUndoCommand : public QUndoCommand
9999
virtual void redo();
100100
virtual void undo();
101101

102-
virtual bool mergeWith(const QUndoCommand *other);
102+
virtual bool mergeWith(const QUndoCommand* other);
103103

104104
private:
105105
void refreshText();
@@ -124,7 +124,7 @@ class ProfileDescriptionChangeUndoCommand : public QUndoCommand
124124
virtual void redo();
125125
virtual void undo();
126126

127-
virtual bool mergeWith(const QUndoCommand *other);
127+
virtual bool mergeWith(const QUndoCommand* other);
128128

129129
private:
130130
void refreshText();

include/TailoringWindow.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ class TailoringWindow : public QMainWindow
172172
void syncCollapsedItem(QTreeWidgetItem* item, QSet<QString>& usedCollapsedIds);
173173

174174
void createTreeItem(QTreeWidgetItem* treeItem, struct xccdf_item* xccdfItem);
175-
void synchronizeTreeItemSelections(QTreeWidgetItem *treeItem);
176-
175+
void synchronizeTreeItemSelections(QTreeWidgetItem* treeItem);
176+
177177
void createSelectionMacro(QTreeWidgetItem* treeItem, bool checkState, const QString& commandName);
178178

179179
MainWindow* mParentMainWindow;
@@ -217,7 +217,7 @@ class TailoringWindow : public QMainWindow
217217

218218
typedef std::map<struct xccdf_value*, std::vector<struct xccdf_rule*> > ValueAffectsRulesMap;
219219
ValueAffectsRulesMap mValueAffectsRulesMap;
220-
220+
221221
QAction* mDeselectAllAction;
222222

223223
private slots:

src/APIHelpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ QString oscapItemGetReadableTitle(struct xccdf_item* item, struct xccdf_policy*
5151
return ret;
5252
}
5353

54-
QString oscapItemGetReadableDescription(struct xccdf_item *item, struct xccdf_policy *policy, const QString& lang)
54+
QString oscapItemGetReadableDescription(struct xccdf_item* item, struct xccdf_policy* policy, const QString& lang)
5555
{
5656
struct oscap_text_iterator* desc_it = xccdf_item_get_description(item);
5757
oscap_text* unresolved = oscap_textlist_get_preferred_text(desc_it, lang.isEmpty() ? NULL : lang.toUtf8().constData());

src/DiagnosticsDialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,18 @@ void DiagnosticsDialog::pushMessage(MessageSeverity severity, const QString& ful
138138
strSeverity = strSeverity.leftJustified(8);
139139

140140
std::cerr << stime << " | " << strSeverity.toUtf8().constData() << " | " << fullMessage.toUtf8().constData() << std::endl;
141-
141+
142142
QString outputMessage = fullMessage;
143143
if (format & MF_XML)
144144
{
145145
outputMessage = Qt::escape(outputMessage);
146146
}
147-
147+
148148
if (format & MF_PREFORMATTED)
149149
{
150150
outputMessage = QString("<pre>%1</pre>").arg(outputMessage);
151151
}
152-
152+
153153
mUI.messages->append(
154154
QString("<table><tr><td style=\"padding:5px 0px 0px 5px\"><pre>%1 </pre></td><td style=\"background: %2; padding:5px\"><pre>%3 </pre></td><td>%4</td></tr></table>\n")
155155
.arg(stime, bgCol, strSeverity, outputMessage)

src/MainWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ void MainWindow::scanWarningMessage(const QString& message)
12101210
mDiagnosticsDialog->warningMessage(message);
12111211
}
12121212

1213-
void MainWindow::scanErrorMessage(const QString &message)
1213+
void MainWindow::scanErrorMessage(const QString& message)
12141214
{
12151215
mDiagnosticsDialog->errorMessage(message);
12161216
}

src/RemediationRoleSaver.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,25 +248,30 @@ void ResultBasedLibraryRemediationSaver::saveToFile(const QString& filename)
248248
{
249249
struct oscap_source* source = oscap_source_new_from_file(mArfFile.fileName().toUtf8().constData());
250250
oscap_document_type_t document_type = oscap_source_get_scap_type(source);
251-
if (document_type != OSCAP_DOCUMENT_ARF) {
251+
if (document_type != OSCAP_DOCUMENT_ARF)
252+
{
252253
throw std::runtime_error("Expected an ARF file");
253254
}
254255

255256
struct ds_rds_session* arf_session = ds_rds_session_new_from_source(source);
256-
if (arf_session == NULL) {
257+
if (arf_session == NULL)
258+
{
257259
throw std::runtime_error("Couldn't open ARF session");
258260
}
259-
struct oscap_source *report_source = ds_rds_session_select_report(arf_session, NULL);
260-
if (report_source == NULL) {
261+
struct oscap_source* report_source = ds_rds_session_select_report(arf_session, NULL);
262+
if (report_source == NULL)
263+
{
261264
throw std::runtime_error("Couldn't get report source from the ARF session");
262265
}
263-
struct oscap_source *report_request_source = ds_rds_session_select_report_request(arf_session, NULL);
264-
if (report_request_source == NULL) {
266+
struct oscap_source* report_request_source = ds_rds_session_select_report_request(arf_session, NULL);
267+
if (report_request_source == NULL)
268+
{
265269
throw std::runtime_error("Couldn't get report request source from the ARF session");
266270
}
267271

268272
struct xccdf_session* session = xccdf_session_new_from_source(oscap_source_clone(report_request_source));
269-
if (xccdf_session_add_report_from_source(session, oscap_source_clone(report_source))) {
273+
if (xccdf_session_add_report_from_source(session, oscap_source_clone(report_source)))
274+
{
270275
throw std::runtime_error("Couldn't get report request source from the ARF session");
271276
}
272277
oscap_source_free(source);

0 commit comments

Comments
 (0)