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

Commit 02562e9

Browse files
author
Martin Preisler
committed
Merge branch 'v1-1'
2 parents e66732f + 92e29ff commit 02562e9

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
@@ -177,8 +177,8 @@ class TailoringWindow : public QMainWindow
177177
void syncCollapsedItem(QTreeWidgetItem* item, QSet<QString>& usedCollapsedIds);
178178

179179
void createTreeItem(QTreeWidgetItem* treeItem, struct xccdf_item* xccdfItem);
180-
void synchronizeTreeItemSelections(QTreeWidgetItem *treeItem);
181-
180+
void synchronizeTreeItemSelections(QTreeWidgetItem* treeItem);
181+
182182
void createSelectionMacro(QTreeWidgetItem* treeItem, bool checkState, const QString& commandName);
183183

184184
MainWindow* mParentMainWindow;
@@ -222,7 +222,7 @@ class TailoringWindow : public QMainWindow
222222

223223
typedef std::map<struct xccdf_value*, std::vector<struct xccdf_rule*> > ValueAffectsRulesMap;
224224
ValueAffectsRulesMap mValueAffectsRulesMap;
225-
225+
226226
QAction* mSelectAllAction;
227227
QAction* mDeselectAllAction;
228228

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
@@ -1225,7 +1225,7 @@ void MainWindow::scanWarningMessage(const QString& message)
12251225
mDiagnosticsDialog->warningMessage(message);
12261226
}
12271227

1228-
void MainWindow::scanErrorMessage(const QString &message)
1228+
void MainWindow::scanErrorMessage(const QString& message)
12291229
{
12301230
mDiagnosticsDialog->errorMessage(message);
12311231
}

src/RemediationRoleSaver.cpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,25 +252,30 @@ void ResultBasedLibraryRemediationSaver::saveToFile(const QString& filename)
252252
{
253253
struct oscap_source* source = oscap_source_new_from_file(mArfFile.fileName().toUtf8().constData());
254254
oscap_document_type_t document_type = oscap_source_get_scap_type(source);
255-
if (document_type != OSCAP_DOCUMENT_ARF) {
255+
if (document_type != OSCAP_DOCUMENT_ARF)
256+
{
256257
throw std::runtime_error("Expected an ARF file");
257258
}
258259

259260
struct ds_rds_session* arf_session = ds_rds_session_new_from_source(source);
260-
if (arf_session == NULL) {
261+
if (arf_session == NULL)
262+
{
261263
throw std::runtime_error("Couldn't open ARF session");
262264
}
263-
struct oscap_source *report_source = ds_rds_session_select_report(arf_session, NULL);
264-
if (report_source == NULL) {
265+
struct oscap_source* report_source = ds_rds_session_select_report(arf_session, NULL);
266+
if (report_source == NULL)
267+
{
265268
throw std::runtime_error("Couldn't get report source from the ARF session");
266269
}
267-
struct oscap_source *report_request_source = ds_rds_session_select_report_request(arf_session, NULL);
268-
if (report_request_source == NULL) {
270+
struct oscap_source* report_request_source = ds_rds_session_select_report_request(arf_session, NULL);
271+
if (report_request_source == NULL)
272+
{
269273
throw std::runtime_error("Couldn't get report request source from the ARF session");
270274
}
271275

272276
struct xccdf_session* session = xccdf_session_new_from_source(oscap_source_clone(report_request_source));
273-
if (xccdf_session_add_report_from_source(session, oscap_source_clone(report_source))) {
277+
if (xccdf_session_add_report_from_source(session, oscap_source_clone(report_source)))
278+
{
274279
throw std::runtime_error("Couldn't get report request source from the ARF session");
275280
}
276281
oscap_source_free(source);

0 commit comments

Comments
 (0)