]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/dialogs/EditFolderDialog.cpp
Move the Settings Dialog to its own class. https://redmine.stoutner.com/issues/1151
[PrivacyBrowserPC.git] / src / dialogs / EditFolderDialog.cpp
index eb2bdcf4d4f51212533e0acbb72c9c96a1606986..950e502a7790db72eba97e633dd0e2d09b9bb2cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2023 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2023-2024 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
  *
@@ -26,7 +26,7 @@
 #include <QFileDialog>
 
 // Construct the class.
-EditFolderDialog::EditFolderDialog(const int databaseId, QIcon &currentWebsiteFavoriteIcon) : QDialog(nullptr), folderDatabaseId(databaseId)
+EditFolderDialog::EditFolderDialog(QWidget *parentWidgetPointer, const int databaseId, QIcon &currentWebsiteFavoriteIcon) : QDialog(parentWidgetPointer), folderDatabaseId(databaseId)
 {
     // Set the window title.
     setWindowTitle(i18nc("The edit folder dialog window title.", "Edit Folder"));
@@ -93,8 +93,8 @@ EditFolderDialog::EditFolderDialog(const int databaseId, QIcon &currentWebsiteFa
     // Populate the line edits.
     folderNameLineEditPointer->setText(bookmarkStructPointer->name);
 
-    // Scroll to the beginning of the line edits.
-    folderNameLineEditPointer->setCursorPosition(0);
+    // Focus the folder name line edit.
+    folderNameLineEditPointer->setFocus();
 
     // Connect the buttons.
     connect(browseButtonPointer, SIGNAL(clicked()), this, SLOT(browse()));